Module

Error Handler

This module contains the error handler middleware.

View Source API/src/middlewares/error_handler.js, line 1

Methods

# inner errorHandler(err, req, res, next)

Error Handler Middleware

This middleware handles all errors thrown by the application and sends a response to the client.

Parameters:
Name Type Description
err Error
req Request
res Response
next *

View Source API/src/middlewares/error_handler.js, line 47

# inner handleValidationErr(err) → {CustomAPIError}

Handles Validation Errors, these errors are thrown by mongoose when a model validation fails

Parameters:
Name Type Description
err Error

View Source API/src/middlewares/error_handler.js, line 27

CustomAPIError