Skip to content

Commit

Permalink
fix!: Do not return responsebody in delete, only raw response (#2236)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 committed Jul 24, 2023
1 parent 5c02d6a commit ea70419
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nodejs-common/service-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,13 @@ class ServiceObject<T = any> extends EventEmitter {
ServiceObject.prototype.request.call(
this,
reqOpts,
(err: ApiError | null, ...args) => {
(err: ApiError | null, body?: ResponseBody, res?: r.Response) => {
if (err) {
if (err.code === 404 && ignoreNotFound) {
err = null;
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
callback(err, ...(args as any));
callback(err, res);
}
);
}
Expand Down

0 comments on commit ea70419

Please sign in to comment.