New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/service-error-classification

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/service-error-classification - npm Package Compare versions

Comparing version 3.0.10 to 3.0.11

4

dist-cjs/index.js

@@ -73,5 +73,5 @@ var __defProp = Object.defineProperty;

}, "isThrottlingError");
var isTransientError = /* @__PURE__ */ __name((error) => {
var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => {
var _a;
return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0);
return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1);
}, "isTransientError");

@@ -78,0 +78,0 @@ var isServerError = /* @__PURE__ */ __name((error) => {

@@ -8,6 +8,7 @@ import { CLOCK_SKEW_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from "./constants";

error.$retryable?.throttling == true;
export const isTransientError = (error) => isClockSkewCorrectedError(error) ||
export const isTransientError = (error, depth = 0) => isClockSkewCorrectedError(error) ||
TRANSIENT_ERROR_CODES.includes(error.name) ||
NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0);
TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
(error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
export const isServerError = (error) => {

@@ -14,0 +15,0 @@ if (error.$metadata?.httpStatusCode !== undefined) {

@@ -18,3 +18,3 @@ import { SdkError } from "@smithy/types";

*/
export declare const isTransientError: (error: SdkError) => boolean;
export declare const isTransientError: (error: SdkError, depth?: number) => boolean;
export declare const isServerError: (error: SdkError) => boolean;

@@ -18,3 +18,3 @@ import { SdkError } from "@smithy/types";

*/
export declare const isTransientError: (error: SdkError) => boolean;
export declare const isTransientError: (error: SdkError, depth?: number) => boolean;
export declare const isServerError: (error: SdkError) => boolean;
{
"name": "@smithy/service-error-classification",
"version": "3.0.10",
"version": "3.0.11",
"scripts": {

@@ -57,4 +57,4 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",

"dependencies": {
"@smithy/types": "^3.7.1"
"@smithy/types": "^3.7.2"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc