summaryrefslogtreecommitdiff
path: root/ui/app/components/error_panel.js
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-12-26 18:25:58 -0800
committerKali Kaneko (leap communications) <kali@leap.se>2016-12-29 03:10:03 +0100
commit38fc7da2a9cff329c3b4975d9f01c16c10b572e9 (patch)
tree90acbc081a959eafac71c64c8cbb483d5b1d1b3c /ui/app/components/error_panel.js
parent3461fb49985413bb578af511bf0d13efbc25b5b6 (diff)
[feature] add support for authenticated API to bitmask.js
Diffstat (limited to 'ui/app/components/error_panel.js')
-rw-r--r--ui/app/components/error_panel.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/components/error_panel.js b/ui/app/components/error_panel.js
index fc88d45..7b36044 100644
--- a/ui/app/components/error_panel.js
+++ b/ui/app/components/error_panel.js
@@ -9,11 +9,21 @@ export default class ErrorPanel extends React.Component {
}
render () {
+ var error_msg = null
+ var error = this.props.error
+ console.log(error)
+ if (error instanceof Error && error.stack) {
+ error_msg = error.stack
+ } else if (error instanceof PromiseRejectionEvent) {
+ error_msg = "Error connecting to bitmaskd"
+ } else {
+ error_msg = error.toString()
+ }
return (
- <Center width="400">
+ <Center width="600">
<Area>
<h1>Error</h1>
- {this.props.error}
+ {error_msg}
</Area>
</Center>
)