import CreateHttpError from "http-errors" ; import { HttpStatus } from "../status" ; export function createHttpError ( statusOrError , message ? , props ? ) { if ( message === undefined ) { return CreateHttpError ( statusOrError ) ; } if ( props === undefined ) { return CreateHttpError ( statusOrError , message ) ; } return CreateHttpError ( statusOrError , message , props ) ; } export function isHttpError ( statusOrError ) { return CreateHttpError . isHttpError ( statusOrError ) ; }