@bitwild/rockets-auth
Version:
Rockets Auth - Complete authentication and authorization solution for NestJS with JWT, OAuth, OTP, role-based access control, and more
34 lines • 1.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserMetadataUnauthorizedAccessException = exports.UserMetadataCannotBeDeletedException = exports.UserMetadataNotFoundException = exports.UserMetadataException = void 0;
const common_1 = require("@nestjs/common");
const nestjs_common_1 = require("@concepta/nestjs-common");
class UserMetadataException extends nestjs_common_1.RuntimeException {
constructor(message, options) {
super(Object.assign({ message }, options));
this.errorCode = 'USER_METADATA_ERROR';
}
}
exports.UserMetadataException = UserMetadataException;
class UserMetadataNotFoundException extends UserMetadataException {
constructor(options) {
super('The user metadata was not found', Object.assign({ httpStatus: common_1.HttpStatus.NOT_FOUND }, options));
this.errorCode = 'USER_METADATA_NOT_FOUND_ERROR';
}
}
exports.UserMetadataNotFoundException = UserMetadataNotFoundException;
class UserMetadataCannotBeDeletedException extends UserMetadataException {
constructor(options) {
super('Cannot delete user metadata because it has associated records', Object.assign({ httpStatus: common_1.HttpStatus.CONFLICT }, options));
this.errorCode = 'USER_METADATA_CANNOT_BE_DELETED_ERROR';
}
}
exports.UserMetadataCannotBeDeletedException = UserMetadataCannotBeDeletedException;
class UserMetadataUnauthorizedAccessException extends UserMetadataException {
constructor(options) {
super('You are not authorized to access this user metadata', Object.assign({ httpStatus: common_1.HttpStatus.FORBIDDEN }, options));
this.errorCode = 'USER_METADATA_UNAUTHORIZED_ACCESS_ERROR';
}
}
exports.UserMetadataUnauthorizedAccessException = UserMetadataUnauthorizedAccessException;
//# sourceMappingURL=user-metadata.exception.js.map