(error: AppError)
| 57 | } |
| 58 | |
| 59 | export function diagnosticsText(error: AppError): string { |
| 60 | const payload = { |
| 61 | code: error.code, |
| 62 | title: error.title, |
| 63 | detail: error.detail, |
| 64 | suggestion: error.suggestion, |
| 65 | status: error.status, |
| 66 | retryable: error.retryable, |
| 67 | diagnostics: error.diagnostics || {} |
| 68 | } |
| 69 | return JSON.stringify(payload, null, 2) |
| 70 | } |
| 71 | |
| 72 | function isAppError(value: any): value is AppError { |
| 73 | return !!value |
nothing calls this directly
no outgoing calls
no test coverage detected