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
1 changed files with 5 additions and 3 deletions

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