From 5d0b9607bc28ab616164705e9b1ca1581cd0f529 Mon Sep 17 00:00:00 2001 From: Alexey Tsymbal Date: Fri, 12 Apr 2024 21:44:04 +0300 Subject: [PATCH] chore: remove req id from client error message --- packages/sdk/CHANGELOG.md | 4 ++++ packages/sdk/package.json | 2 +- packages/sdk/src/dialect-cloud-api/data-service-errors.ts | 5 ++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 14811c42..b79c6070 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## [1.7.7] - 2024-04-12 + +- feat: hide req id from client error message + ## [1.7.6] - 2024-04-11 - feat: expose find dapp api diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2e53a3db..f2b74105 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@dialectlabs/sdk", - "version": "1.7.6", + "version": "1.7.7", "repository": "git@github.com:dialectlabs/sdk.git", "author": "dialectlabs", "license": "Apache-2.0", diff --git a/packages/sdk/src/dialect-cloud-api/data-service-errors.ts b/packages/sdk/src/dialect-cloud-api/data-service-errors.ts index 507ea515..0e61b5a9 100644 --- a/packages/sdk/src/dialect-cloud-api/data-service-errors.ts +++ b/packages/sdk/src/dialect-cloud-api/data-service-errors.ts @@ -19,6 +19,7 @@ export async function withErrorParsing( try { return await promise; } catch (e) { + console.error(e); if (e instanceof NetworkError) { throw new DialectCloudUnreachableError([e]); } @@ -49,7 +50,5 @@ export async function withErrorParsing( } function createMessage(e: DataServiceApiError) { - return `${e.message ?? e.error}. ${ - e.requestId ? `Request ID: ${e.requestId}` : '' - }`; + return `${e.message ?? e.error}`; }