csabaxyz opened a new issue, #356:
URL: https://github.com/apache/couchdb-nano/issues/356

   I updated to nano v11 and started getting server crashes in my local dev 
environment, because of this line:
   
https://github.com/apache/couchdb-nano/blob/26fb0e11111f997a40bc9556496d296767ea8c77/lib/nano.js#L131
   
   Looks like the response doesn't have a `cause` property:
   ```
   126 |     const responseHeaders = Object.assign({
   127 |       uri: scrubURL(req.url),
   128 |       statusCode
   129 |     }, response.headers ? response.headers : {})
   130 |     if (!response.status) {
   131 |       response.statusText = response.cause.toString()
                                              ^
   TypeError: undefined is not an object (evaluating 'response.cause.toString')
         at <anonymous> (/opt/src/node_modules/nano/lib/nano.js:131:38)
         at responseHandler (/opt/src/node_modules/nano/lib/nano.js:112:43)
         at <anonymous> (/opt/src/node_modules/nano/lib/nano.js:431:11)
   ```
   
   For reference I'm using Bun instead of Node.js, so that might be the real 
culprit, but the fix is either `response.cause?.toString()` or adding a 
fallback cause.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to