post status form error handling
This commit is contained in:
parent
7fc0765dc9
commit
d449701b84
3 changed files with 3 additions and 12 deletions
|
|
@ -13,8 +13,9 @@ function humanizeErrors(errors) {
|
|||
export function StatusCodeError(statusCode, body, options, response) {
|
||||
this.name = 'StatusCodeError'
|
||||
this.statusCode = statusCode
|
||||
this.message =
|
||||
statusCode + ' - ' + (JSON && JSON.stringify ? JSON.stringify(body) : body)
|
||||
this.details = JSON && JSON.stringify ? JSON.stringify(body) : body
|
||||
this.errorData = body.error
|
||||
this.message = statusCode + ' - ' + body.error.error || body.error
|
||||
this.error = body // legacy attribute
|
||||
this.options = options
|
||||
this.response = response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue