mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* 404 for unknown transaction Fixes #1689 * add helper for displaying custom error screen
9 lines
291 B
TypeScript
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);
|
|
}
|