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