()
| 124 | const { t } = useTranslation() |
| 125 | // Constrain the generic type so we don't provide a non-existent key |
| 126 | const statusCode = () => { |
| 127 | if (!isRouteErrorResponse(error)) { |
| 128 | return "500" |
| 129 | } |
| 130 | // Supported error code messages |
| 131 | switch (error.status) { |
| 132 | case 200: |
| 133 | return "200" |
| 134 | case 403: |
| 135 | return "403" |
| 136 | case 404: |
| 137 | return "404" |
| 138 | default: |
| 139 | return "500" |
| 140 | } |
| 141 | } |
| 142 | const errorStatusCode = statusCode() |
| 143 | if (errorStatusCode === "404") { |
| 144 | return ( |
no outgoing calls
no test coverage detected
searching dependent graphs…