Skip to content

Commit

Permalink
Improve client-side error message
Browse files Browse the repository at this point in the history
  • Loading branch information
MantisClone committed Oct 27, 2023
1 parent 25b4d1e commit fdd8a32
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/request-client.js/src/http-data-access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fdd8a32

Please sign in to comment.