Skip to content

Commit 5c3a7e0

Browse files
committed
fix(service-error-classification): add TypeError as transient error
1 parent 57e0a48 commit 5c3a7e0

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const isTransientError = (error: SdkError, depth = 0): boolean =>
3636
TRANSIENT_ERROR_CODES.includes(error.name) ||
3737
NODEJS_TIMEOUT_ERROR_CODES.includes((error as { code?: string })?.code || "") ||
3838
TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
39+
error instanceof TypeError ||
3940
(error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
4041

4142
export const isServerError = (error: SdkError) => {

0 commit comments

Comments
 (0)