mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Update error respnse format
This commit is contained in:
parent
bf6e7ed6de
commit
e0eddc7db8
1 changed files with 3 additions and 0 deletions
|
|
@ -373,6 +373,7 @@ export const ERROR_CODE_EMAIL_NOT_FOUND = 'email-not-found';
|
|||
export const ERROR_CODE_EMAIL_NOT_VERIFIED = 'email-unverified';
|
||||
export const ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS = 'email-too-many-verification-requests';
|
||||
export const ERROR_CODE_UPLOAD_OVER_LIMIT = 'request-upload-over-limit';
|
||||
export const ERROR_CODE_VALIDATION_INVALID_PARAMS = 'validation-invalid-params';
|
||||
const ERROR_CODES = [
|
||||
ERROR_CODE_TRANSACTION_LISTING_NOT_FOUND,
|
||||
ERROR_CODE_TRANSACTION_INVALID_TRANSITION,
|
||||
|
|
@ -384,6 +385,7 @@ const ERROR_CODES = [
|
|||
ERROR_CODE_EMAIL_NOT_VERIFIED,
|
||||
ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS,
|
||||
ERROR_CODE_UPLOAD_OVER_LIMIT,
|
||||
ERROR_CODE_VALIDATION_INVALID_PARAMS,
|
||||
];
|
||||
|
||||
// API error
|
||||
|
|
@ -393,6 +395,7 @@ export const apiError = shape({
|
|||
status: number.isRequired,
|
||||
code: oneOf(ERROR_CODES).isRequired,
|
||||
title: string.isRequired,
|
||||
meta: object,
|
||||
});
|
||||
|
||||
// Storable error prop type. (Error object should not be stored as it is.)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue