ForestAdmin/forest-express

View on GitHub
src/utils/errors/forbidden-error.ts

Summary

Maintainability
A
1 hr
Test Coverage
A
100%
export default class ForbiddenError extends Error {
  public readonly status: number;

  constructor(message?: string) {
    super(message || 'Forbidden');
    this.name = this.constructor.name;
    this.status = 403;
  }
}