UNPKG

@opra/common

Version:
20 lines (19 loc) 519 B
import { OpraHttpError } from '../opra-http-error.js'; /** * 422 Unprocessable Entity * The request was well-formed but was unable to be followed due to semantic errors. */ export class UnprocessableEntityError extends OpraHttpError { constructor() { super(...arguments); this.status = 422; } init(issue) { super.init({ message: 'Unprocessable entity', severity: 'error', code: 'UNPROCESSABLE_ENTITY', ...issue, }); } }