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) {
|
} catch (err) {
|
||||||
logger.error(err)
|
logger.error(err)
|
||||||
const APIStatus = {
|
const APIStatus = {
|
||||||
message: err.response.data,
|
message: err?.response?.data,
|
||||||
responseTime: err.response.headers['x-response-time'],
|
responseTime: err?.response?.headers['x-response-time'],
|
||||||
success: false
|
success: false
|
||||||
}
|
}
|
||||||
logger.warn('Failed to retrieve API status', APIStatus)
|
logger.warn('Failed to retrieve API status', APIStatus)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue