tarekdx3's picture
feat: implement Sprint 1 Dev A - Assignments and Grades modules
56e2348
Raw
History Blame Contribute Delete
750 Bytes
import { NotFoundException, BadRequestException } from '@nestjs/common';
export class GradeNotFoundException extends NotFoundException {
constructor(gradeId?: number) {
super(`Grade ${gradeId ? `with ID ${gradeId} ` : ''}not found`);
}
}
export class RubricNotFoundException extends NotFoundException {
constructor(rubricId?: number) {
super(`Rubric ${rubricId ? `with ID ${rubricId} ` : ''}not found`);
}
}
export class GradeAlreadyPublishedException extends BadRequestException {
constructor() {
super('Cannot modify published grade');
}
}
export class InvalidGradeTypeException extends BadRequestException {
constructor(gradeType?: string) {
super(`Invalid grade type${gradeType ? `: ${gradeType}` : ''}`);
}
}