Skip to content

Return more detailed response from controllers #72

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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