(error: Error)
| 7 | |
| 8 | /** Pass any error. If the error is an AtomicError and it's Unauthorized, return true */ |
| 9 | export function isUnauthorized(error: Error): boolean { |
| 10 | if (error instanceof AtomicError) { |
| 11 | if (error.type == ErrorType.Unauthorized) { |
| 12 | return true; |
| 13 | } |
| 14 | } |
| 15 | return false; |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Atomic Data Errors have an additional Type, which tells the client what kind |
no outgoing calls
no test coverage detected