UNPKG

@opra/common

Version:
24 lines (23 loc) 745 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotAcceptableError = void 0; const opra_http_error_js_1 = require("../opra-http-error.js"); /** * 406 Not Acceptable * This response is sent when the web server, after performing server-driven content negotiation, * doesn't find any content that conforms to the criteria given by the user agent. */ class NotAcceptableError extends opra_http_error_js_1.OpraHttpError { constructor() { super(...arguments); this.status = 406; } init(issue) { super.init({ message: 'Not Acceptable', code: 'NOT_ACCEPTABLE', ...issue, }); } } exports.NotAcceptableError = NotAcceptableError;