Files
explore/ui/shared/AppError/isCustomAppError.ts
T
Igor StuevandGitHub 8d9a397f1a Process 403 error from address/token/contract handle (#2477)
* Process 403 error from address/token/contract handle

* review fix
2025-01-01 12:25:04 +01:00

9 lines
296 B
TypeScript

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