Skip to content

Return more detailed response from controllers #72

Open
@petak5

Description

@petak5

Controllers should return tuple containing a dictionary which will be converted to JSON by the view and a return code.
Error message will be sent in the dictionary.

Examples:
return {'status': 'success', 'data': user}, 200
return {'status': 'failed', 'msg': 'User not found'}, 404

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions