Skip to content

Commit 071e6b1

Browse files
committed
fix(service-error-classification): update status code logic
1 parent 2817cad commit 071e6b1

File tree

1 file changed

+1
-1
lines changed
  • packages/service-error-classification/src

1 file changed

+1
-1
lines changed

packages/service-error-classification/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const isTransientError = (error: SdkError) =>
3131
export const isServerError = (error: SdkError) => {
3232
if (error.$metadata?.httpStatusCode !== undefined) {
3333
const statusCode = error.$metadata.httpStatusCode;
34-
if (statusCode > 499 && statusCode <= 599 && !isTransientError(error)) {
34+
if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {
3535
return true;
3636
}
3737
return false;

0 commit comments

Comments
 (0)