Files
explore/ui/shared/AppError/isCustomAppError.ts
T
tom goriunovandGitHub 0c7b6f5f45 404 for unknown transaction (#1697)
* 404 for unknown transaction

Fixes #1689

* add helper for displaying custom error screen
2024-03-18 13:28:00 +03:00

9 lines
291 B
TypeScript

import type { ResourceError } from 'lib/api/resources';
// status codes when custom error screen should be shown
const CUSTOM_STATUS_CODES = [ 404, 422, 429 ];
export default function isCustomAppError(error: ResourceError<unknown>) {
return CUSTOM_STATUS_CODES.includes(error.status);
}