(object: any)
| 7 | } |
| 8 | |
| 9 | export const isBridgeError = (object: any): object is { error: Error } => |
| 10 | typeof object === 'object' && |
| 11 | typeof object.error === 'object' && |
| 12 | typeof object.error.name === 'string' && |
| 13 | typeof object.error.status === 'number'; |
| 14 | |
| 15 | export const httpError = <Status extends ErrorStatus, Name extends string, Data>( |
| 16 | status: Status, |