Skip to content

Commit

Permalink
Add error logging for MSSQL environment
Browse files Browse the repository at this point in the history
  • Loading branch information
MXPOL committed Dec 5, 2023
1 parent b7d65e8 commit de38cf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/velo-external-db-core/src/web/error-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { NextFunction, Response } from 'express'
import { domainToSpiErrorTranslator } from './domain-to-spi-error-translator'

export const errorMiddleware = (err: any, _req: any, res: Response, _next?: NextFunction) => {
if (process.env['TYPE'] === 'mssql') {
console.error(err)
}

if (process.env['NODE_ENV'] !== 'test') {
console.error(err)
}
Expand Down

0 comments on commit de38cf9

Please sign in to comment.