Skip to content

Commit

Permalink
Simplify error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwatson484 committed Aug 10, 2021
1 parent ec95a8f commit 1af6ebe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/plugins/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ module.exports = {
// Log the error
request.log('error', {
statusCode: statusCode,
message: response.message,
payloadMessage: response.data ? response.data.payload.message : '',
stack: response.data ? response.data.stack : response.stack
message: response?.message,
payloadMessage: response?.data?.payload?.message,
stack: response?.data?.stack
})

// The return the `500` view
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dream-league-web",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "app/index.js",
"scripts": {
Expand Down

0 comments on commit 1af6ebe

Please sign in to comment.