Skip to content

Commit

Permalink
fix(service-error-classification): update status code logic
Browse files Browse the repository at this point in the history
  • Loading branch information
srchase committed Dec 9, 2022
1 parent 2817cad commit 071e6b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/service-error-classification/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const isTransientError = (error: SdkError) =>
export const isServerError = (error: SdkError) => {
if (error.$metadata?.httpStatusCode !== undefined) {
const statusCode = error.$metadata.httpStatusCode;
if (statusCode > 499 && statusCode <= 599 && !isTransientError(error)) {
if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {
return true;
}
return false;
Expand Down

0 comments on commit 071e6b1

Please sign in to comment.