(code: string, error: unknown)
| 49 | |
| 50 | return framework ?? getErrorMessage(error); |
| 51 | }; |
| 52 | |
| 53 | const isFrameworkCode = (code: string): boolean => |
| 54 | FRAMEWORK_SAFE_MESSAGES[code] !== undefined; |
| 55 | |
| 56 | /* |
| 57 | * The stack is developer detail for everything else. For framework |
| 58 | * VALIDATION/PARSE errors it embeds the submitted body, so it is never |
| 59 | * attached, in development or anywhere else. |
| 60 | */ |
| 61 | export const stackFor = ( |
| 62 | code: string, |
no test coverage detected