optional chaining

This commit is contained in:
Henry Jameson 2026-08-04 15:59:52 +03:00
commit cf85b00c0a
26 changed files with 34 additions and 34 deletions

View file

@ -14,7 +14,7 @@ export function StatusCodeError(statusCode, body, options, response) {
this.name = 'StatusCodeError'
this.statusCode = statusCode
this.statusText = body.error || body.errors || body
this.details = JSON && JSON.stringify ? JSON.stringify(body) : body
this.details = JSON.stringify(body)
this.errorData = body.error || body.errors
this.message = this.statusCode + ' - ' + this.statusText
this.error = body // legacy attribute