From f8083a24d1dc5a6b813e22aafa664301b3fbc926 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Fri, 13 May 2022 12:57:05 +0200 Subject: [PATCH] Return correct api error status Signed-off-by: Alexis Sellier --- src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index 4978f0c49..7a3b1e100 100644 --- a/src/api.ts +++ b/src/api.ts @@ -68,7 +68,7 @@ export class Request { } if (! response.ok) { - throw new ApiError("Not found", urlString); + throw new ApiError(response.statusText, urlString); } return response.json(); }