diff --git a/web/service/fetch.ts b/web/service/fetch.ts index d6f1af3b3f..04dfe74cc2 100644 --- a/web/service/fetch.ts +++ b/web/service/fetch.ts @@ -24,8 +24,12 @@ export type FetchOptionType = Omit & { } const afterResponse204: AfterResponseHook = async (_request, _options, response) => { - if (response.status === 204) - return Response.json({ result: 'success' }) + if (response.status === 204) { + return new Response(JSON.stringify({ result: 'success' }), { + status: 200, + headers: { 'Content-Type': ContentType.json }, + }) + } } export type ResponseError = {