diff --git a/src/rest/run_method.ts b/src/rest/run_method.ts index 2ce3d0144..19afefb8c 100644 --- a/src/rest/run_method.ts +++ b/src/rest/run_method.ts @@ -8,7 +8,7 @@ export function runMethod( body?: unknown, retryCount = 0, bucketId?: string | null, -): Promise | undefined { +): Promise { rest.eventHandlers.debug?.("requestCreate", { method, url, @@ -35,7 +35,7 @@ export function runMethod( .then((res) => { if (res.status === 204) return undefined; - return res.json() as T; + return res.json() as unknown as T; }) .catch((error) => { console.error(error);