Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dynatrace-sdk/shared-errors

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace-sdk/shared-errors - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

types/packages/shared-errors/src/invalid-response-error.d.ts

8

CHANGELOG.md

@@ -5,2 +5,8 @@ # shared-errors

## 0.0.3
### Patch Changes
- Added InvalidResponseError class. APPDEV-9585
## 0.0.2

@@ -10,3 +16,3 @@

- Introduced ApiClientError, ClientRequestError and ApiGatewayError. APPDEV-9219
- Introduced existing ApiClientError, ClientRequestError and the new ApiGatewayError. APPDEV-9219

@@ -13,0 +19,0 @@ ## 0.0.1

@@ -42,6 +42,8 @@ /**

ErrorType: () => ErrorType,
InvalidResponseError: () => InvalidResponseError,
SDKError: () => SDKError,
isApiClientError: () => isApiClientError,
isApiGatewayError: () => isApiGatewayError,
isClientRequestError: () => isClientRequestError
isClientRequestError: () => isClientRequestError,
isInvalidResponseError: () => isInvalidResponseError
});

@@ -102,2 +104,22 @@ module.exports = __toCommonJS(src_exports);

// packages/shared-errors/src/invalid-response-error.ts
var InvalidResponseError = class extends ApiClientError {
isInvalidResponseError = true;
responseBody;
expectedType;
nestedError;
constructor(name, nestedError, body, expectedType, message) {
super(
name,
message ?? `${name}: Response does not match expected datatype${expectedType ? " " + expectedType : ""}: ${nestedError?.toString() ?? "unable to deserialize"}`
);
this.nestedError = nestedError;
this.responseBody = body;
this.expectedType = expectedType;
}
};
function isInvalidResponseError(e) {
return e?.isInvalidResponseError === true && isApiClientError(e);
}
// packages/shared-errors/src/sdk-error.ts

@@ -104,0 +126,0 @@ var SDKError = class extends Error {

@@ -69,2 +69,22 @@ /**

// packages/shared-errors/src/invalid-response-error.ts
var InvalidResponseError = class extends ApiClientError {
isInvalidResponseError = true;
responseBody;
expectedType;
nestedError;
constructor(name, nestedError, body, expectedType, message) {
super(
name,
message ?? `${name}: Response does not match expected datatype${expectedType ? " " + expectedType : ""}: ${nestedError?.toString() ?? "unable to deserialize"}`
);
this.nestedError = nestedError;
this.responseBody = body;
this.expectedType = expectedType;
}
};
function isInvalidResponseError(e) {
return e?.isInvalidResponseError === true && isApiClientError(e);
}
// packages/shared-errors/src/sdk-error.ts

@@ -83,6 +103,8 @@ var SDKError = class extends Error {

ErrorType,
InvalidResponseError,
SDKError,
isApiClientError,
isApiGatewayError,
isClientRequestError
isClientRequestError,
isInvalidResponseError
};

2

package.json
{
"name": "@dynatrace-sdk/shared-errors",
"version": "0.0.2",
"version": "0.0.3",
"description": "Shared error classes for autogenerated Dynatrace SDK packages.",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

export * from './api-client-error';
export * from './api-gateway-error';
export * from './client-request-error';
export * from './invalid-response-error';
export * from './sdk-error';
export * from './types';
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