We have a number of endpoints that return the 204 HTTP status code when handling DELETE requests. These are currently throwing an error because of the attempt to parse the body (
|
return (this.parseBody(response) as any) as Promise<TResult>; |
), however, for these responses there isn't a body. To handle this I think that
didReceiveResponse should check the status code before attempting to parse the body.
We have a number of endpoints that return the
204HTTP status code when handlingDELETErequests. These are currently throwing an error because of the attempt to parse the body (apollo-server/packages/apollo-datasource-rest/src/RESTDataSource.ts
Line 94 in c908fac
didReceiveResponseshould check the status code before attempting to parse the body.