Skip to content

Commit

Permalink
feat: Update high congestion error code
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Mar 28, 2023
1 parent 9342af5 commit 41979fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/logic/transaction-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function createTransactionMiddleware(

if (error instanceof HighCongestionError) {
return {
status: StatusCode.ERROR,
status: StatusCode.SERVICE_UNAVAILABLE,
body: {
ok: false,
message: error.message,
Expand Down
1 change: 1 addition & 0 deletions src/types/HTTPResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum StatusCode {
LOCKED = 423,
CONFLICT = 409,
ERROR = 500,
SERVICE_UNAVAILABLE = 503,
}

type TransactionsResponseBody = TransactionRow[]
Expand Down

0 comments on commit 41979fc

Please sign in to comment.