Skip to content

Commit 5e75394

Browse files
committed
cleanup
1 parent d9fcf7e commit 5e75394

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

packages/sdk/src/shared/index.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,6 @@ export abstract class BaseClient {
943943
...fetchOpts
944944
} = opts;
945945

946-
947-
948946
const url = new URL(`${baseURL}${path}`);
949947

950948
if (params) {
@@ -1001,20 +999,6 @@ export abstract class BaseClient {
1001999

10021000
const response: Response = await fetch(url.toString(), requestOptions);
10031001

1004-
/* if (!response.ok) {
1005-
const errorBody = await response.text();
1006-
throw new Error(
1007-
`HTTP error! status: ${response.status}, body: ${errorBody}`,
1008-
);
1009-
}
1010-
1011-
// Attempt to parse JSON, fall back to raw text if it fails
1012-
const contentType = response.headers.get("Content-Type");
1013-
if (contentType && contentType.includes("application/json")) {
1014-
return (await response.json()) as T;
1015-
}
1016-
1017-
return (await response.text()) as unknown as T;*/
10181002
const rawBody = await response.text();
10191003

10201004
if (!response.ok) {
@@ -1034,7 +1018,6 @@ export abstract class BaseClient {
10341018
return rawBody as unknown as T;
10351019
}
10361020

1037-
10381021
protected abstract authHeaders(): string | Promise<string>;
10391022

10401023
/**

0 commit comments

Comments
 (0)