Optional accessor on this error
This commit is contained in:
parent
3f89ec57ba
commit
afbf7cb0d3
1 changed files with 2 additions and 2 deletions
|
|
@ -100,8 +100,8 @@ module.exports = async (
|
|||
} catch (err) {
|
||||
logger.error(err)
|
||||
const APIStatus = {
|
||||
message: err.response.data,
|
||||
responseTime: err.response.headers['x-response-time'],
|
||||
message: err?.response?.data,
|
||||
responseTime: err?.response?.headers['x-response-time'],
|
||||
success: false
|
||||
}
|
||||
logger.warn('Failed to retrieve API status', APIStatus)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue