diff --git a/packages/ra-core/src/dataProvider/HttpError.ts b/packages/ra-core/src/dataProvider/HttpError.ts index c0caa23bc52..fa01d3c79b8 100644 --- a/packages/ra-core/src/dataProvider/HttpError.ts +++ b/packages/ra-core/src/dataProvider/HttpError.ts @@ -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);