Skip to content

Commit

Permalink
Merge pull request #1066 from univapay/fix/pierreh923-update-309-erro…
Browse files Browse the repository at this point in the history
…r-mapping-to-a-more-generic-error

Change 309 error mapping
  • Loading branch information
gdp88 committed May 22, 2024
2 parents f24b1fd + 6e31d82 commit addbd8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/errors/APIError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export enum ResponseErrorCode {
InternalServerError = "INTERNAL_SERVER_ERROR",
ServiceUnavailable = "SERVICE_UNAVAILABLE",
NotAuthorized = "NOT_AUTHORIZED",
ProcessingError = "PROCESSING_ERROR",

/* global */
UnknownError = "UNKNOWN_ERROR",
Expand Down
2 changes: 1 addition & 1 deletion src/errors/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const getProcessingErrorCodeByStatus = (status: number): string => {
306: ResponseErrorCode.CardRejected,
307: ResponseErrorCode.CardInvalid,
308: ResponseErrorCode.ChargeInvalidData,
309: ResponseErrorCode.ExpirationDateError,
309: ResponseErrorCode.ProcessingError,
310: ResponseErrorCode.InvalidUserData,
311: ResponseErrorCode.TooManyChargeRequests,
312: ResponseErrorCode.CancelUnavailable,
Expand Down

0 comments on commit addbd8f

Please sign in to comment.