diff --git a/app/package.json b/app/package.json index ef3440d..0c8e8bc 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "vessel", "productName": "vessel", - "version": "0.0.6f", + "version": "0.0.6g", "description": "A simple wallet for managing your Steem accounts.", "main": "./main.prod.js", "author": { diff --git a/app/reducers/processing.js b/app/reducers/processing.js index ac48df1..bd0f09b 100644 --- a/app/reducers/processing.js +++ b/app/reducers/processing.js @@ -187,14 +187,20 @@ export default function processing(state: any = defaultState, action: actionType } function setError(response) { - const stack = response.payload.error.data.stack[0]; - const values = Object.keys(stack.data); - let message = stack.format; - if (values.length) { - values.map((key) => { - const value = stack.data[key]; - message = message.split('${' + key + '}').join(value); - }) + try { + const stack = response.payload.error.data.stack[0]; + const values = Object.keys(stack.data); + let message = stack.format; + if (values.length) { + values.map((key) => { + const value = stack.data[key]; + message = message.split('${' + key + '}').join(value); + }); + } + return message; + } catch (e) { + console.log(e); + console.log(response); + return 'Unknown Error, check View -> Devtools for more information.'; } - return message } diff --git a/package.json b/package.json index 7e4ba30..106f698 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vessel", "productName": "vessel", - "version": "0.0.6f", + "version": "0.0.6g", "description": "A simple wallet for managing your Steem accounts.", "scripts": { "test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js",