From fdd8a3219251ec93d4657c56681dd476122b1684 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Fri, 27 Oct 2023 17:40:33 -0400 Subject: [PATCH] Improve client-side error message --- packages/request-client.js/src/http-data-access.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/request-client.js/src/http-data-access.ts b/packages/request-client.js/src/http-data-access.ts index 0d92672906..429c73b457 100644 --- a/packages/request-client.js/src/http-data-access.ts +++ b/packages/request-client.js/src/http-data-access.ts @@ -130,12 +130,13 @@ export default class HttpDataAccess implements DataAccessTypes.IDataAccess { let error: Error = e; if (e.response.status === 404) { error = new Error( - `Transaction confirmation not received after ${ - this.httpConfig.getConfirmationDeferDelay + - this.httpConfig.getConfirmationMaxRetry * this.httpConfig.getConfirmationRetryDelay - }ms. (${this.httpConfig.getConfirmationDeferDelay}ms defer delay plus ${ - this.httpConfig.getConfirmationMaxRetry - } retries with ${this.httpConfig.getConfirmationRetryDelay}ms retry delay)`, + `Transaction confirmation not received. Try polling + getTransactionsByChannelId() until the transaction is confirmed. + deferDelay: ${this.httpConfig.getConfirmationDeferDelay}ms, + maxRetries: ${this.httpConfig.getConfirmationMaxRetry}, + retryDelay: ${this.httpConfig.getConfirmationRetryDelay}ms, + exponentialBackoffDelay: ${this.httpConfig.getConfirmationExponentialBackoffDelay}ms, + maxExponentialBackoffDelay: ${this.httpConfig.getConfirmationMaxExponentialBackoffDelay}ms`, ); } result.emit('error', error);