Update manager.ts (#4176)

This commit is contained in:
Fleny
2025-04-28 18:28:55 +02:00
committed by GitHub
parent b3de175f13
commit 80509a1420
+1 -1
View File
@@ -562,7 +562,7 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
const result = await fetch(`${rest.baseUrl}/v${rest.version}${route}`, rest.createRequestBody(method, options))
if (!result.ok) {
const body = (result.headers.get('Content-Type') === 'application/json' ? await result.json() : await result.text()).catch(() => null)
const body = await (result.headers.get('Content-Type') === 'application/json' ? result.json() : result.text()).catch(() => null)
error.cause = {
ok: false,