Skip to content

Commit

Permalink
Fixed handling of unknown status codes. Added default status text for…
Browse files Browse the repository at this point in the history
… 529 error. (#1971)
  • Loading branch information
azaslonov authored Oct 14, 2022
1 parent f2ccec0 commit d60af57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export class OperationConsole {
const knownStatusCode = KnownStatusCodes.find(x => x.code === response.statusCode);

const responseStatusText = response.statusText || knownStatusCode
? knownStatusCode.description
? knownStatusCode?.description
: "Unknown";

this.responseStatusCode(response.statusCode.toString());
Expand Down
3 changes: 2 additions & 1 deletion src/models/knownStatusCodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ export const KnownStatusCodes = [
{ code: 507, description: "Insufficient Storage" },
{ code: 508, description: "Loop Detected" },
{ code: 509, description: "Bandwidth Limit Exceeded" },
{ code: 510, description: "Not Extended" }
{ code: 510, description: "Not Extended" },
{ code: 529, description: "Server is overloaded" }
];

0 comments on commit d60af57

Please sign in to comment.