Skip to content

Instantly share code, notes, and snippets.

@BahiHussein
Created May 28, 2020 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BahiHussein/760013da2af1b7d50d4f46706d1f5d1f to your computer and use it in GitHub Desktop.
Save BahiHussein/760013da2af1b7d50d4f46706d1f5d1f to your computer and use it in GitHub Desktop.
{
success: false, // Boolean - required. the overall state of the request
error_code: "INVALID_INPUT", // String - required. complements the overall state be providing more details. default "NULL"
status_code: 400, // Number - required. the standard response code
message: "What have you done ?!", // String - required. the response main message
description: "Invalid data input. please make sure you have valid...", //String - required
errors: [
{
"label":"user.mobile",
"path":"user.mobile",
"message":"user.mobile is required",
"log":"_required",
"errors":[]
}
],
pagination: {
"self": "http://example.com/articles",
"next": "http://example.com/articles?page[offset]=2",
"last": "http://example.com/articles?page[offset]=10"
},
data: { key: "value" },
actions: [
{
type: 'dialog',
data: { title: 'you have created your account', body: 'some data in the body' }
},
{
type: 'timeout',
data: { milliseconds: 3000 }
},
{
type: 'redirect',
data: { path: '/' }
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment