"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorResource = void 0;
/**
 * ErrorResource is a Resource that throws an error on any request, communicating to the client when attempts are made
 * to access endpoints/resources that had an internal error in their configuration or setup. This helps ensure that
 * if there is a problem with a resource, it is immediately apparent and can be fixed.
 */
class ErrorResource {
    error;
    constructor(error) {
        this.error = error;
    }
    isError = true;
    allowRead() {
        throw this.error;
    }
    allowUpdate() {
        throw this.error;
    }
    allowCreate() {
        throw this.error;
    }
    allowDelete() {
        throw this.error;
    }
    getId() {
        throw this.error;
    }
    getContext() {
        throw this.error;
    }
    get() {
        throw this.error;
    }
    post() {
        throw this.error;
    }
    put() {
        throw this.error;
    }
    delete() {
        throw this.error;
    }
    connect() {
        throw this.error;
    }
    getResource() {
        // all child paths resolve back to reporting this error
        return this;
    }
    publish() {
        throw this.error;
    }
    subscribe() {
        throw this.error;
    }
}
exports.ErrorResource = ErrorResource;
//# sourceMappingURL=ErrorResource.js.map