diff --git a/src/FunctionsClient.ts b/src/FunctionsClient.ts index ed1849f..7fbd5c6 100644 --- a/src/FunctionsClient.ts +++ b/src/FunctionsClient.ts @@ -102,10 +102,12 @@ export class FunctionsClient { const isRelayError = response.headers.get('x-relay-error') if (isRelayError && isRelayError === 'true') { + response.body?.cancel() throw new FunctionsRelayError(response) } if (!response.ok) { + response.body?.cancel() throw new FunctionsHttpError(response) }