@thorprovider/adapters 5.0.6 → 5.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/core/errors.ts +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -320,7 +320,8 @@ declare class ResourceNotFoundError extends CommerceError {
|
|
|
320
320
|
*/
|
|
321
321
|
declare class ProviderAPIError extends CommerceError {
|
|
322
322
|
readonly provider: string;
|
|
323
|
-
|
|
323
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
324
|
+
constructor(message: string, provider: string, status?: number, details?: Record<string, unknown> | undefined);
|
|
324
325
|
}
|
|
325
326
|
/**
|
|
326
327
|
* Extract error message from various error types
|
package/dist/index.d.ts
CHANGED
|
@@ -320,7 +320,8 @@ declare class ResourceNotFoundError extends CommerceError {
|
|
|
320
320
|
*/
|
|
321
321
|
declare class ProviderAPIError extends CommerceError {
|
|
322
322
|
readonly provider: string;
|
|
323
|
-
|
|
323
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
324
|
+
constructor(message: string, provider: string, status?: number, details?: Record<string, unknown> | undefined);
|
|
324
325
|
}
|
|
325
326
|
/**
|
|
326
327
|
* Extract error message from various error types
|
package/dist/index.js
CHANGED
|
@@ -470,12 +470,14 @@ var ResourceNotFoundError = class extends CommerceError {
|
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
var ProviderAPIError = class extends CommerceError {
|
|
473
|
-
constructor(message, provider, status) {
|
|
473
|
+
constructor(message, provider, status, details) {
|
|
474
474
|
super(message, "PROVIDER_API_ERROR", status);
|
|
475
475
|
this.provider = provider;
|
|
476
|
+
this.details = details;
|
|
476
477
|
this.name = "ProviderAPIError";
|
|
477
478
|
}
|
|
478
479
|
provider;
|
|
480
|
+
details;
|
|
479
481
|
};
|
|
480
482
|
function extractErrorMessage(error) {
|
|
481
483
|
if (error instanceof Error && error.message) {
|