Skip to content

Add global error handling middleware #1

@alanansari

Description

@alanansari

This can replace all the existing error responses and can be used to catch all errors.
A function that sets the error code and msg can be used throughout the codebase with this.
Error response through this middleware must be like this:
{
success: false,
msg: "Custom/Default Error Message"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions