Skip to content

Commit

Permalink
Merge pull request #4911 from jesseshieh/patch-2
Browse files Browse the repository at this point in the history
Set HttpError name to be HttpError
  • Loading branch information
djhi authored Jun 10, 2020
2 parents ae64892 + fbb5b3b commit a334deb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/ra-core/src/dataProvider/HttpError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class HttpError extends Error {
public readonly body = null
) {
super(message);
Object.setPrototypeOf(this, HttpError.prototype);
this.name = this.constructor.name;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
Expand Down

0 comments on commit a334deb

Please sign in to comment.