Skip to content

All the responses should follow the best practice structure #2

@agentmilindu

Description

@agentmilindu

Usually, the JSON responses sent from RESTful services have a common structure to follow,

{
   "data" : { 
     "someprop" : "somevalue",
     ....
   },
   "error" : [ ] 
}

Or

{
   "data" : {},
   "error" : [ 
     {
        "code" : "4000",
        "message" : "User not authorized"
     }
   ] 
}

Shall we follow the same?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions