(
error: ValidationError,
status: ContentfulStatusCode,
timestamp: string,
)
| 273 | } |
| 274 | |
| 275 | function createValidationErrorResponse( |
| 276 | error: ValidationError, |
| 277 | status: ContentfulStatusCode, |
| 278 | timestamp: string, |
| 279 | ): ErrorResponse { |
| 280 | const flatErrors = z.flattenError(error.zodError); |
| 281 | return createErrorResponse(error, status, timestamp, { |
| 282 | name: error.name, |
| 283 | ...flatErrors, |
| 284 | }); |
| 285 | } |
| 286 | |
| 287 | function createInternalErrorResponse( |
| 288 | error: Error, |
no test coverage detected