diff --git a/package.json b/package.json index f72ecf9..70088d2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@internxt/sdk", "author": "Internxt ", - "version": "1.12.2", + "version": "1.12.3", "description": "An sdk for interacting with Internxt's services", "repository": { "type": "git", diff --git a/src/shared/types/errors.ts b/src/shared/types/errors.ts index a0d6524..3a4fb6e 100644 --- a/src/shared/types/errors.ts +++ b/src/shared/types/errors.ts @@ -1,13 +1,15 @@ export default class AppError extends Error { public readonly status?: number; public readonly code?: string; - public readonly headers?: Record; + public readonly response?: { + headers?: Record; + }; constructor(message: string, status?: number, code?: string, headers?: Record) { super(message); this.status = status; this.code = code; - this.headers = headers; + this.response = headers ? { headers } : undefined; } }