Skip to content

Commit

Permalink
sdk: chore: log unknown api errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmbl committed Apr 25, 2024
1 parent a0f7ef1 commit e8e42a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## [1.9.1] - 2024-04-26

- chore: log unknown api errors

## [1.9.0] - 2024-04-23

- feat: support tx actions in notifications
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dialectlabs/sdk",
"version": "1.9.0",
"version": "1.9.1",
"type": "module",
"repository": "git@github.com:dialectlabs/sdk.git",
"author": "dialectlabs",
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk/src/dialect-cloud-api/data-service-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export async function withErrorParsing<T>(
try {
return await promise;
} catch (e) {
console.error(e);
if (e instanceof NetworkError) {
throw new DialectCloudUnreachableError([e]);
}
Expand All @@ -43,8 +42,10 @@ export async function withErrorParsing<T>(
if (e.statusCode === 422) {
throw new BusinessConstraintViolationError(createMessage(e));
}
console.error(e);
throw new UnknownError([e], createMessage(e));
}
console.error(e);
throw new UnknownError([e]);
}
}
Expand Down

0 comments on commit e8e42a3

Please sign in to comment.