summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/browserHttpLib.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-01-17 15:58:20 -0300
committerSebastian <sebasjm@gmail.com>2023-01-17 16:01:26 -0300
commiteeea3e62a01638b37c8bb8d6f8fdeac129a4afae (patch)
treefd1e97f0c3dda5b4077e7e0b53d8c844a8fc9aa4 /packages/taler-wallet-webextension/src/browserHttpLib.ts
parent5be2d128ed088a77d6448ac1ebf25aba3716bd81 (diff)
downloadwallet-core-eeea3e62a01638b37c8bb8d6f8fdeac129a4afae.tar.gz
wallet-core-eeea3e62a01638b37c8bb8d6f8fdeac129a4afae.tar.bz2
wallet-core-eeea3e62a01638b37c8bb8d6f8fdeac129a4afae.zip
stronger type check to be sure that ErrorDetails is consistent
Diffstat (limited to 'packages/taler-wallet-webextension/src/browserHttpLib.ts')
-rw-r--r--packages/taler-wallet-webextension/src/browserHttpLib.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/browserHttpLib.ts b/packages/taler-wallet-webextension/src/browserHttpLib.ts
index 26fa8eb11..165a0037c 100644
--- a/packages/taler-wallet-webextension/src/browserHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/browserHttpLib.ts
@@ -90,7 +90,8 @@ export class BrowserHttpLib implements HttpRequestLibrary {
TalerError.fromDetail(
TalerErrorCode.WALLET_NETWORK_ERROR,
{
- requestUrl: requestUrl,
+ requestUrl,
+ requestMethod,
},
"Could not make request",
),
@@ -103,7 +104,8 @@ export class BrowserHttpLib implements HttpRequestLibrary {
const exc = TalerError.fromDetail(
TalerErrorCode.WALLET_NETWORK_ERROR,
{
- requestUrl: requestUrl,
+ requestUrl,
+ requestMethod,
},
"HTTP request failed (status 0, maybe URI scheme was wrong?)",
);
@@ -124,7 +126,8 @@ export class BrowserHttpLib implements HttpRequestLibrary {
throw TalerError.fromDetail(
TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE,
{
- requestUrl: requestUrl,
+ requestUrl,
+ requestMethod,
httpStatusCode: myRequest.status,
},
"Invalid JSON from HTTP response",
@@ -134,7 +137,8 @@ export class BrowserHttpLib implements HttpRequestLibrary {
throw TalerError.fromDetail(
TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE,
{
- requestUrl: requestUrl,
+ requestUrl,
+ requestMethod,
httpStatusCode: myRequest.status,
},
"Invalid JSON from HTTP response",