Skip to content

Commit

Permalink
Add error code to untranslated errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Oct 19, 2020
1 parent e82ef6b commit 7078b7e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class GlobalTransactionMessageErrorDefault extends Component<Props> {
t
} = this.props;

let errorMessage = error.error && error.error.details[0] && error.error.details[0].message;
let errorMessage = error.error && error.error.details && error.error.details[0] && error.error.details[0].message;

if (errorMessage) {
const errorMessageArray = errorMessage.split('assertion failure with message:');
Expand All @@ -31,7 +31,7 @@ export class GlobalTransactionMessageErrorDefault extends Component<Props> {
<p key={error}>
{(errorMessage)
? t(errorMessage)
: error.message
: `${error.message} (${error.error ? error.error : ''})`
}
</p>
{(typeof error === 'object' && !(error instanceof Error)) ? (
Expand Down

0 comments on commit 7078b7e

Please sign in to comment.