UNPKG

apisearch

Version:
49 lines (48 loc) 1.45 kB
"use strict"; exports.__esModule = true; exports.ResourceExistsError = void 0; var tslib_1 = require("tslib"); var ErrorWithMessage_1 = require("./ErrorWithMessage"); /** * Resource exists error */ var ResourceExistsError = /** @class */ (function (_super) { tslib_1.__extends(ResourceExistsError, _super); function ResourceExistsError() { return _super !== null && _super.apply(this, arguments) || this; } /** * Get transportable http error * * @return {number} */ ResourceExistsError.getTransportableHTTPError = function () { return 409; }; /** * Index not available * * @return {InvalidFormatError} */ ResourceExistsError.indexAvailable = function () { return new ResourceExistsError("Index exists and cannot be created again"); }; /** * Events not available * * @return {InvalidFormatError} */ ResourceExistsError.eventsIndexAvailable = function () { return new ResourceExistsError("Events index exists and cannot be created again"); }; /** * Logs not available * * @return {InvalidFormatError} */ ResourceExistsError.logsIndexAvailable = function () { return new ResourceExistsError("Logs index exists and cannot be created again"); }; return ResourceExistsError; }(ErrorWithMessage_1.ErrorWithMessage)); exports.ResourceExistsError = ResourceExistsError;