Final final fix.
This commit is contained in:
parent
de2d0e6b89
commit
10608f9bb7
|
@ -50,7 +50,8 @@ class CouchDBError extends Error {
|
||||||
constructor(
|
constructor(
|
||||||
message: string,
|
message: string,
|
||||||
info: {
|
info: {
|
||||||
status: number
|
status: number | undefined
|
||||||
|
statusCode: number | undefined
|
||||||
name: string
|
name: string
|
||||||
errid: string
|
errid: string
|
||||||
description: string
|
description: string
|
||||||
|
@ -59,8 +60,9 @@ class CouchDBError extends Error {
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
super(message)
|
super(message)
|
||||||
this.status = info.status
|
const statusCode = info.status || info.statusCode || 500
|
||||||
this.statusCode = info.status
|
this.status = statusCode
|
||||||
|
this.statusCode = statusCode
|
||||||
this.reason = info.reason
|
this.reason = info.reason
|
||||||
this.name = info.name
|
this.name = info.name
|
||||||
this.errid = info.errid
|
this.errid = info.errid
|
||||||
|
|
Loading…
Reference in New Issue