From c2bf478999f343338ae4517746ef45f2d48589a7 Mon Sep 17 00:00:00 2001 From: Enric Bisbe Gil Date: Thu, 3 Oct 2024 12:04:32 +0200 Subject: [PATCH] Return json response on error --- src/services/rest/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/rest/index.ts b/src/services/rest/index.ts index 15b9beb..e921048 100644 --- a/src/services/rest/index.ts +++ b/src/services/rest/index.ts @@ -43,7 +43,7 @@ export class FlickrService { if (json.stat === "fail") { // @ts-expect-error throw new Error(json.message, { - cause: res, + cause: json, }) }