Skip to content

Add support for adding 'extra details' (meta) in error response #95

@sachingaikwad123

Description

@sachingaikwad123

Add support for adding 'extra details' (meta) in error response

Example: We have a REST API 'add-employee'. It adds employee with given information into Django Database. It checks if employee already exists with "mobile number" and returns error: "Employee already exists".

When returning "Employee already exists" error, we also want to return "Existing Employee Details" to client in this error response. This can be useful for client (frontend) to show it to user.

Can we add support to return some "extra_details" or "meta" information along with error response?

If we already support this, then please let me know how to do this. I was not able to figure this out from docs/my experiments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions