UNPKG

apisearch

Version:
26 lines (22 loc) 596 B
import {ErrorWithMessage} from "./ErrorWithMessage"; /** * Unsupported content type error */ export class UnsupportedContentTypeError extends ErrorWithMessage { /** * Get transportable http error * * @return {number} */ public static getTransportableHTTPError() { return 415; } /** * Unsupported content type * * @return {InvalidFormatError} */ public static createUnsupportedContentTypeException() { return new UnsupportedContentTypeError("This content type is not accepted. Please use application/json"); } }