Skip to content

Commit 31a5d7a

Browse files
types: merge custom body in HTTPError.toJSON result (#1216)
1 parent f4dfd79 commit 31a5d7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class HTTPError<DataT = unknown>
232232
return this.statusText;
233233
}
234234

235-
toJSON(): ErrorBody {
235+
toJSON(): Omit<ErrorBody, "body"> & ErrorBody["body"] {
236236
const unhandled = this.unhandled;
237237
return {
238238
status: this.status,

0 commit comments

Comments
 (0)