From 7d73da1ac002b4844f9fa0c0ebcf3872f0415855 Mon Sep 17 00:00:00 2001 From: Yaroslav Yakushevych Date: Tue, 18 Nov 2025 22:30:13 +0200 Subject: [PATCH] fix: handle 204 No Content without JSON parsing in http-client.ejs --- templates/custom/http-client.ejs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/custom/http-client.ejs b/templates/custom/http-client.ejs index 0327f39..0a4fd26 100644 --- a/templates/custom/http-client.ejs +++ b/templates/custom/http-client.ejs @@ -195,6 +195,11 @@ export class HttpClient { r.data = (null as unknown) as T; r.error = (null as unknown) as E; + if(response.status === 204){ + r.data = {}; + return r; + } + if (!response.ok && response.status < 500) { const data = await r.json() r.data = data