| 11 | import { CliAuthError } from '../config.js' |
| 12 | |
| 13 | export interface StructuredError { |
| 14 | success: false |
| 15 | error: { |
| 16 | code: string |
| 17 | httpStatus?: number |
| 18 | message: string |
| 19 | retryable?: boolean |
| 20 | requestId?: string | null |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export function toStructuredError(err: unknown): StructuredError { |
| 25 | if (err instanceof CliApiError) { |
nothing calls this directly
no outgoing calls
no test coverage detected