Skip to content

Commit

Permalink
feat: 코스 수정할 때 인증 상태에서 권한 없는 리소스 접근 커스텀 예외 클래스 구현 #83
Browse files Browse the repository at this point in the history
  • Loading branch information
koomchang committed Nov 9, 2024
1 parent a75ebfc commit 8ccdd6f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/src/course/exception/CoursePermissionException.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { BaseException } from '../../common/exception/BaseException';
import { HttpStatus } from '@nestjs/common';

export class CoursePermissionException extends BaseException {
constructor(id: number) {
super({
code: 903,
message: `id:${id} 코스에 대한 권한이 없습니다.`,
status: HttpStatus.FORBIDDEN,
});
}
}

0 comments on commit 8ccdd6f

Please sign in to comment.