MCPcopy Create free account
hub / github.com/blockmatic/basilic / redactBody

Function redactBody

apps/api/src/plugins/error-handler.ts:43–61  ·  view source on GitHub ↗

Redacts sensitive data from request body

(body: unknown)

Source from the content-addressed store, hash-verified

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,

Callers 1

error-handler.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected