diff options
author | Sebastian <sebasjm@gmail.com> | 2023-10-19 02:45:10 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-10-19 02:56:15 -0300 |
commit | c0dd59db4f6217ddd963237a24ee2558b7d0b2c0 (patch) | |
tree | c26e6969059f7f752574442690cfef2efd4b8034 /packages/web-util | |
parent | f89e27a4e39412c4863fe26f821988a65ecec1b9 (diff) | |
download | wallet-core-c0dd59db4f6217ddd963237a24ee2558b7d0b2c0.tar.xz |
return info on timeout
Diffstat (limited to 'packages/web-util')
-rw-r--r-- | packages/web-util/src/utils/http-impl.browser.ts | 6 | ||||
-rw-r--r-- | packages/web-util/src/utils/http-impl.sw.ts | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/web-util/src/utils/http-impl.browser.ts b/packages/web-util/src/utils/http-impl.browser.ts index 598146149..f19d1fe61 100644 --- a/packages/web-util/src/utils/http-impl.browser.ts +++ b/packages/web-util/src/utils/http-impl.browser.ts @@ -104,7 +104,11 @@ export class BrowserHttpLib implements HttpRequestLibrary { reject( TalerError.fromDetail( TalerErrorCode.WALLET_HTTP_REQUEST_GENERIC_TIMEOUT, - {}, + { + requestUrl, + requestMethod, + timeoutMs: requestTimeout.d_ms === "forever" ? 0 : requestTimeout.d_ms + }, `request to ${requestUrl} timed out`, ), ); diff --git a/packages/web-util/src/utils/http-impl.sw.ts b/packages/web-util/src/utils/http-impl.sw.ts index 05696105c..aab88021f 100644 --- a/packages/web-util/src/utils/http-impl.sw.ts +++ b/packages/web-util/src/utils/http-impl.sw.ts @@ -110,7 +110,11 @@ export class ServiceWorkerHttpLib implements HttpRequestLibrary { if (controller.signal) { throw TalerError.fromDetail( TalerErrorCode.WALLET_HTTP_REQUEST_GENERIC_TIMEOUT, - {}, + { + requestUrl, + requestMethod, + timeoutMs: requestTimeout.d_ms === "forever" ? 0 : requestTimeout.d_ms + }, `request to ${requestUrl} timed out`, ); } |