UNPKG

@fdm-monster/server

Version:

FDM Monster is a bulk OctoPrint, Klipper, PrusaLink and BambuLab manager to set up, configure and monitor 3D printers. Our aim is to provide neat overview over your farm.

84 lines (83 loc) 2.46 kB
//#region src/exceptions/runtime.exceptions.ts var NotImplementedException = class NotImplementedException extends Error { constructor(message) { super(message); this.name = NotImplementedException.name; } }; var AuthenticationError = class AuthenticationError extends Error { reasonCode; constructor(error, reasonCode = "") { super(error); this.name = AuthenticationError.name; this.reasonCode = reasonCode; } }; var ForbiddenError = class ForbiddenError extends Error { constructor(error) { super(error); this.name = ForbiddenError.name; } }; var AuthorizationError = class AuthorizationError extends Error { permissions = []; roles = []; reason; constructor({ permissions, roles, reason }) { super("Authorization failed"); this.name = AuthorizationError.name; this.reason = reason; this.permissions = permissions; this.roles = roles; } }; var BadRequestException = class BadRequestException extends Error { constructor(message) { super(message); this.name = BadRequestException.name; } }; var ConflictException = class ConflictException extends Error { existingResourceId; constructor(message, existingResourceId) { super(message); this.name = ConflictException.name; this.existingResourceId = existingResourceId; } }; var NotFoundException = class NotFoundException extends Error { path; constructor(message, path) { super(message); this.name = NotFoundException.name; this.path = path; } }; var ValidationException = class ValidationException extends Error { errors; constructor(validationObject) { super(JSON.stringify(validationObject)); this.name = ValidationException.name; this.errors = validationObject; } }; var ExternalServiceError = class ExternalServiceError extends Error { error; serviceType; constructor(responseObject, serviceType) { super(JSON.stringify(responseObject)); this.name = ExternalServiceError.name; this.error = responseObject; this.serviceType = serviceType; } }; var InternalServerException = class InternalServerException extends Error { constructor(message, stack) { super(message); this.name = InternalServerException.name; this.stack = stack; } }; //#endregion export { AuthenticationError, AuthorizationError, BadRequestException, ConflictException, ExternalServiceError, ForbiddenError, InternalServerException, NotFoundException, NotImplementedException, ValidationException }; //# sourceMappingURL=runtime.exceptions.js.map