"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FetchError = exports.WebOperationError = exports.NotEditableError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = void 0;
class CustomError extends Error {
    constructor(message) {
        super(message);
        // see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html
        Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
        this.name = new.target.name; // stack traces display correctly now
    }
}
class UnauthorizedError extends CustomError {
}
exports.UnauthorizedError = UnauthorizedError;
class CrossOriginForbiddenError extends CustomError {
}
exports.CrossOriginForbiddenError = CrossOriginForbiddenError;
class SameOriginForbiddenError extends CustomError {
}
exports.SameOriginForbiddenError = SameOriginForbiddenError;
class NotFoundError extends CustomError {
}
exports.NotFoundError = NotFoundError;
class NotEditableError extends CustomError {
}
exports.NotEditableError = NotEditableError;
class WebOperationError extends CustomError {
}
exports.WebOperationError = WebOperationError;
class FetchError extends CustomError {
    status;
    constructor(status, message) {
        super(message);
        this.status = status;
    }
}
exports.FetchError = FetchError;
//# sourceMappingURL=CustomError.js.map