Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Commit 953c3a9

Browse files
Merge pull request #2 from aptos-labs/zach/429
Add support for HTTP 429 error codes.
2 parents 1ed7d6c + 7c2d6c5 commit 953c3a9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/templates/core/functions/catchErrorCodes.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void =>
44
401: 'Unauthorized',
55
403: 'Forbidden',
66
404: 'Not Found',
7+
429: 'Too Many Requests',
78
500: 'Internal Server Error',
89
502: 'Bad Gateway',
910
503: 'Service Unavailable',

test/__snapshots__/index.spec.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void =>
483483
401: 'Unauthorized',
484484
403: 'Forbidden',
485485
404: 'Not Found',
486+
429: 'Too Many Requests',
486487
500: 'Internal Server Error',
487488
502: 'Bad Gateway',
488489
503: 'Service Unavailable',
@@ -3542,6 +3543,7 @@ const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void =>
35423543
401: 'Unauthorized',
35433544
403: 'Forbidden',
35443545
404: 'Not Found',
3546+
429: 'Too Many Requests',
35453547
500: 'Internal Server Error',
35463548
502: 'Bad Gateway',
35473549
503: 'Service Unavailable',

0 commit comments

Comments
 (0)