Skip to content

Commit

Permalink
Update error
Browse files Browse the repository at this point in the history
  • Loading branch information
nihalbhatnagar committed Jan 9, 2025
1 parent b3cedc5 commit 9b6f916
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion .changeset/soft-files-obey.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
"@osdk/shared.net.errors": patch
"@osdk/shared.net.fetch": patch
---

Expand Down
7 changes: 4 additions & 3 deletions packages/shared.net.fetch/src/createFetchOrThrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export function createFetchOrThrow(fetchFn: typeof fetch = fetch) {
try {
body = await response.json();
} catch (e) {
throw convertError(
e,
"A network error occurred while reading response",
throw new PalantirApiError(
`Failed to fetch ${response.status} ${response.statusText}`,
"UNKNOWN",
undefined,
);
}

Expand Down

0 comments on commit 9b6f916

Please sign in to comment.