Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@internxt/sdk",
"author": "Internxt <hello@internxt.com>",
"version": "1.12.2",
"version": "1.12.3",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions src/shared/types/errors.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
export default class AppError extends Error {
public readonly status?: number;
public readonly code?: string;
public readonly headers?: Record<string, string>;
public readonly response?: {
headers?: Record<string, string>;
};

constructor(message: string, status?: number, code?: string, headers?: Record<string, string>) {
super(message);

this.status = status;
this.code = code;
this.headers = headers;
this.response = headers ? { headers } : undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change could affect all projects that use it. If drive-web handles it correctly because the SDK is designed this way, there is no problem; leave it as it is for now or adapt it to coexist for a period of time and mark the old way as deprecated so that it can be adapted

Copy link
Contributor Author

@terrerox terrerox Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won’t affect other projects because I added the headers recently, and the change exists only in the current version. Since other error.response cases are handled this way in the SDK, we can leave it as is and close the PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you added it recently, sorry!
In any case, perhaps we can leave it as you say, because that's how it's handled in the SDK, and it won't be consistent with Axios' official documentation if we add the response to the status level. So that's fine, we'll leave it like that if you agree :)

}
}
Loading