Skip to content

Commit

Permalink
fix: error formatting for json error
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Apr 11, 2018
1 parent 41ae3fe commit 133de56
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ export function formatError(error, fetchingSchema: boolean = false) {
return { error: `${message}${schemaMessage}. Please check your connection` }
}

try {
const ee = JSON.parse(message)
return ee
} catch (e) {
//
}

return { error: message }
}

Expand Down

0 comments on commit 133de56

Please sign in to comment.