self-review
This commit is contained in:
parent
8dae81e29d
commit
9b53879e70
9 changed files with 8 additions and 29 deletions
|
|
@ -13,9 +13,9 @@ function humanizeErrors(errors) {
|
|||
export function StatusCodeError(statusCode, body, options, response) {
|
||||
this.name = 'StatusCodeError'
|
||||
this.statusCode = statusCode
|
||||
this.statusText = body.error || body
|
||||
this.statusText = body.error || body.errors || body
|
||||
this.details = JSON && JSON.stringify ? JSON.stringify(body) : body
|
||||
this.errorData = body.error
|
||||
this.errorData = body.error || body.errors
|
||||
this.message = this.statusCode + ' - ' + this.statusText
|
||||
this.error = body // legacy attribute
|
||||
this.options = options
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue