Redacts sensitive data from request body
(body: unknown)
| 41 | error, |
| 42 | logger: request.log, |
| 43 | label: `${request.method} ${routePath}`, |
| 44 | data: { |
| 45 | method: request.method, |
| 46 | url: pathOnlyUrl(request.url), |
| 47 | }, |
| 48 | tags: { |
| 49 | app: 'api', |
| 50 | module, |
| 51 | route: routePath, |
| 52 | method: request.method, |
| 53 | }, |
| 54 | }) |
| 55 | |
| 56 | const catalogError = getError(errorCode) ?? |
| 57 | getError('UNEXPECTED_ERROR') ?? { |
| 58 | code: 'UNEXPECTED_ERROR', |
| 59 | message: 'An unexpected error occurred', |
| 60 | } |
| 61 | |
| 62 | reply.status(statusCode).send({ |
| 63 | code: catalogError.code, |
| 64 | message: catalogError.message, |