UNPKG

user-managements-node-server

Version:

starter for express node server with user managements, authentication authorization

7 lines 282 B
import HttpError from './HttpError' import httpStatus from 'http-status' export const getDefaultErrorIfNotSupplied = (error, defaultHttpStatusCode = httpStatus.INTERNAL_SERVER_ERROR) => ( !(error instanceof HttpError) ? new HttpError(defaultHttpStatusCode) : error )