...
|
...
|
@@ -73,8 +73,12 @@ class Api extends Context { |
|
|
logger.info(`api call ${response.statusCode} [${req.method}] ${req.uri.href} ${req.body || ''}`);
|
|
|
return jsonBody;
|
|
|
}).catch(err => {
|
|
|
logger.error(`api call ${err.statusCode} [${err.options.method}]
|
|
|
if (err.statusCode) {
|
|
|
logger.error(`api call ${err.statusCode} [${err.options.method}]
|
|
|
${err.options.url} ${err.response.body || ''}`);
|
|
|
} else {
|
|
|
logger.error(`api call ${err}`);
|
|
|
}
|
|
|
return Promise.reject(API_INTERNAL_ERROR);
|
|
|
});
|
|
|
}
|
...
|
...
|
|