UNPKG

lux-framework

Version:

Build scalable, Node.js-powered REST APIs with almost no code.

19 lines (16 loc) 466 B
// @flow import { MIME_TYPE } from '../constants'; import { line } from '../../logger'; import { createServerError } from '../../server'; /** * @private */ class NotAcceptableError extends TypeError { constructor(contentType: string) { super(line` Media type parameters is not supported. Try your request again without specifying '${contentType.replace(MIME_TYPE, '')}'. `); } } export default createServerError(NotAcceptableError, 406);