mirror of
https://github.com/directus/directus.git
synced 2026-01-29 22:08:05 -05:00
Add forbidden exception
This commit is contained in:
7
src/exceptions/forbidden.ts
Normal file
7
src/exceptions/forbidden.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { BaseException } from './base';
|
||||
|
||||
export class ForbiddenException extends BaseException {
|
||||
constructor(message = `You don't have permission to access this.`) {
|
||||
super(message, 403, 'NO_PERMISSION_TO_ACCESS');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
export * from './base';
|
||||
export * from './collection-not-found';
|
||||
export * from './field-not-found';
|
||||
export * from './forbidden';
|
||||
export * from './invalid-credentials';
|
||||
export * from './invalid-payload';
|
||||
export * from './invalid-query';
|
||||
|
||||
Reference in New Issue
Block a user