Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 200 or 201 response for single object
- data:{
- },
- status: 'success',
- status_code: 200,
- message: 'Account Creation Successful',
- // 200 or 201 response for array of objects
- data:[],
- status: 'success',
- status_code: 200,
- message: 'Account Creation Successful',
- // 422 response for failed validations
- errors:[
- email: ['Email has already been taken'],
- password: ['Password is too short']
- ],
- status: 'failed',
- status_code: 422,
- message: 'Validation Failed',
- // 401 response for unauthorized
- status: 'failed',
- status_code: 401,
- message: 'You are not authorized to carry out this action',
- // 404 response for not found
- status: 'failed',
- status_code: 404,
- message: 'Not found'
- //others
Add Comment
Please, Sign In to add comment