ikea-availability-checker
Version:
ikea product in-store availability checker and product search
34 lines (33 loc) • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IngkaResponseError = exports.IngkaParseError = exports.IngkaHttpError = exports.IngkaError = void 0;
class IngkaError extends Error {
}
exports.IngkaError = IngkaError;
class IngkaHttpError extends Error {
constructor(message, err) {
super(message);
this.name = 'IngkaHttpError';
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
this.err = err;
}
}
exports.IngkaHttpError = IngkaHttpError;
class IngkaParseError extends IngkaError {
constructor(message, data = null) {
super(message);
this.name = 'IngkaParseError';
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
this.data = data;
}
}
exports.IngkaParseError = IngkaParseError;
class IngkaResponseError extends Error {
constructor(message, response) {
super(message);
this.name = 'IngkaResponseError';
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
this.response = response;
}
}
exports.IngkaResponseError = IngkaResponseError;