UNPKG

contentfully

Version:

A simple but performant REST client for Contentful.

13 lines 414 B
export class ContentfulError extends Error { constructor(message, ErrorType) { // call base super(message); this.ErrorType = ErrorType; // fix prototype Object.setPrototypeOf(this, ErrorType.prototype); // bind name based on constructor const object = this; this.name = object.constructor.name; } } //# sourceMappingURL=ContentfulError.js.map