commit c0dd59db4f6217ddd963237a24ee2558b7d0b2c0
parent f89e27a4e39412c4863fe26f821988a65ecec1b9
Author: Sebastian <sebasjm@gmail.com>
Date: Thu, 19 Oct 2023 02:45:10 -0300
return info on timeout
Diffstat:
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
@@ -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
@@ -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`,
);
}