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 authored Jul 13, 2023
1 parent f6ad7b1 commit 1aa6e0a
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 1aa6e0a

Please sign in to comment.