(e: RpcError)
| 4 | import history from "../history"; |
| 5 | |
| 6 | export function HandleError(e: RpcError) { |
| 7 | console.log("API error: ", e.toString()); |
| 8 | |
| 9 | if (e.code === 16 || e.code === 2) { |
| 10 | history.push("/login"); |
| 11 | return; |
| 12 | } |
| 13 | |
| 14 | notification.error({ |
| 15 | message: "Error", |
| 16 | description: e.message, |
| 17 | duration: 3, |
| 18 | }); |
| 19 | } |
| 20 | |
| 21 | export function HandleLoginError(e: RpcError) { |
| 22 | console.log("API error: ", e); |
no test coverage detected