From b54cc703cf2b5ed139e505f3a24afb74c4b628af Mon Sep 17 00:00:00 2001 From: Thomas Rognes <33520517+thomasrognes@users.noreply.github.com> Date: Tue, 21 May 2024 15:20:38 +0200 Subject: [PATCH] =?UTF-8?q?:sparkles:=20H=C3=A5ndterer=20204=20respons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/api/simpleTokenXProxy.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils/api/simpleTokenXProxy.ts b/lib/utils/api/simpleTokenXProxy.ts index 78059d5c..5bd9a298 100644 --- a/lib/utils/api/simpleTokenXProxy.ts +++ b/lib/utils/api/simpleTokenXProxy.ts @@ -66,6 +66,11 @@ export const simpleTokenXProxy = async ({ if (response.ok) { logInfo(`OK ${url}, status ${response.status}, callId ${navCallId}`); + + if (response.status === 204) { + return 'request gikk fint' as T; + } + const headers = response.headers.get('content-type'); const isJson = headers?.includes('application/json');