fix(api-gateway): add debug logs for errors on parsing
This commit is contained in:
parent
fddd17e531
commit
60686dcdbd
1 changed files with 1 additions and 0 deletions
|
@ -92,6 +92,7 @@ void container.load().then((container) => {
|
||||||
server.setErrorConfig((app) => {
|
server.setErrorConfig((app) => {
|
||||||
app.use((error: Record<string, unknown>, request: Request, response: Response, _next: NextFunction) => {
|
app.use((error: Record<string, unknown>, request: Request, response: Response, _next: NextFunction) => {
|
||||||
logger.error(`[URL: ${request.url}][SNJS: ${request.headers['x-snjs-version']}] Error thrown: ${error.stack}`)
|
logger.error(`[URL: ${request.url}][SNJS: ${request.headers['x-snjs-version']}] Error thrown: ${error.stack}`)
|
||||||
|
logger.debug(`[URL: ${request.url}][SNJS: ${request.headers['x-snjs-version']}] Request body: ${request.body}`)
|
||||||
|
|
||||||
response.status(500).send({
|
response.status(500).send({
|
||||||
error: {
|
error: {
|
||||||
|
|
Loading…
Reference in a new issue