@nxtedition/lib 18.0.6 → 18.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/couch.js +2 -0
  2. package/package.json +1 -1
package/couch.js CHANGED
@@ -304,6 +304,7 @@ export function makeCouch(opts) {
304
304
  idempotent: true,
305
305
  blocking: live,
306
306
  method,
307
+ maxRedirects: 4,
307
308
  body: JSON.stringify(body),
308
309
  signal: ac.signal,
309
310
  headers: {
@@ -375,6 +376,7 @@ export function makeCouch(opts) {
375
376
  }
376
377
  return
377
378
  } catch (err) {
379
+ err.reason ??= err.body?.reason
378
380
  if (err.name === 'AbortError' || client.destroyed) {
379
381
  throw err
380
382
  } else if (typeof retry === 'function') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "18.0.6",
3
+ "version": "18.0.7",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",