Function handleApiError

  • Creates a new handler for 404 errors.

    Returns HttpErrorHandler

    The new handler.

    Example

    import createServer from '@egomobile/http-server'
    import { handleApiError } from '@egomobile/api-utils'

    const app = createServer()

    app.setErrorHandler( handleApiError() )

    // ...

    app.listen()
    .catch(console.error)

Generated using TypeDoc