1
0
Fork 0
mirror of synced 2024-09-12 23:43:09 +12:00

Final final fix.

This commit is contained in:
mike12345567 2024-05-10 11:59:11 +01:00 committed by Sam Rose
parent c9ec06b5b1
commit a1a50de61c
No known key found for this signature in database

View file

@ -50,7 +50,8 @@ class CouchDBError extends Error {
constructor(
message: string,
info: {
status: number
status: number | undefined
statusCode: number | undefined
name: string
errid: string
description: string
@ -59,8 +60,9 @@ class CouchDBError extends Error {
}
) {
super(message)
this.status = info.status
this.statusCode = info.status
const statusCode = info.status || info.statusCode || 500
this.status = statusCode
this.statusCode = statusCode
this.reason = info.reason
this.name = info.name
this.errid = info.errid