Skip to content

Commit

Permalink
UPDATE: if clause causing failure
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Jun 21, 2022
1 parent 5d31dc5 commit f8b7038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/collect-auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const customHandler = function (request, reply, ingresses) {
let errorCode = 502
if(error.status) {
errorCode = error.status
} else if ( error.response.status) {
} else if ( error.response && error.response.status) {
errorCode = error.response.status
}
logger.error({...log(error.message), status_code: errorCode});
Expand Down
2 changes: 1 addition & 1 deletion src/routes/collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const handler = function(request, reply) {
let errorCode = 502
if(error.status) {
errorCode = error.status
} else if ( error.response.status) {
} else if ( error.response && error.response.status) {
errorCode = error.response.status
}
logger.error({...log(error.message), status_code: errorCode});
Expand Down

0 comments on commit f8b7038

Please sign in to comment.