summaryrefslogtreecommitdiff
path: root/src/operations/errors.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-30 16:09:32 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-30 16:09:32 +0530
commitaaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf (patch)
tree9274139660f30c4857d80044eb4ac283aac1775a /src/operations/errors.ts
parent15e18440dbad55df19977a2eb7053681259afc18 (diff)
downloadwallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.tar.gz
wallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.tar.bz2
wallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.zip
re-format with prettier v2, fix HTML
Diffstat (limited to 'src/operations/errors.ts')
-rw-r--r--src/operations/errors.ts21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/operations/errors.ts b/src/operations/errors.ts
index 751a57111..50e68993b 100644
--- a/src/operations/errors.ts
+++ b/src/operations/errors.ts
@@ -64,7 +64,6 @@ export async function scrutinizeTalerJsonResponse<T>(
resp: HttpResponse,
codec: Codec<T>,
): Promise<T> {
-
// FIXME: We should distinguish between different types of error status
// to react differently (throttle, report permanent failure)
@@ -82,7 +81,7 @@ export async function scrutinizeTalerJsonResponse<T>(
details: {
httpStatusCode: resp.status,
errorResponse: errorJson,
- }
+ },
});
} catch (e) {
const m = "could not parse response JSON";
@@ -91,7 +90,7 @@ export async function scrutinizeTalerJsonResponse<T>(
message: m,
details: {
status: resp.status,
- }
+ },
});
}
throw exc;
@@ -101,13 +100,13 @@ export async function scrutinizeTalerJsonResponse<T>(
json = await resp.json();
} catch (e) {
const m = "could not parse response JSON";
- throw new OperationFailedError({
- type: "network",
- message: m,
- details: {
- status: resp.status,
- }
- });
+ throw new OperationFailedError({
+ type: "network",
+ message: m,
+ details: {
+ status: resp.status,
+ },
+ });
}
return codec.decode(json);
}
@@ -138,7 +137,7 @@ export async function guardOperationException<T>(
type: "exception",
message: e.message,
details: {},
- }
+ };
await onOpError(opErr);
throw new OperationFailedAndReportedError(opErr);
}