UNPKG

@opra/common

Version:
20 lines (19 loc) 558 B
import { OpraHttpError } from '../opra-http-error.js'; /** * 405 Method Not Allowed * The request method is known by the server but is not supported by the target resource. * For example, an API may not allow calling DELETE to remove a resource. */ export class MethodNotAllowedError extends OpraHttpError { constructor() { super(...arguments); this.status = 405; } init(issue) { super.init({ message: 'Method not allowed', code: 'METHOD_NOT_ALLOWED', ...issue, }); } }