@nxtedition/nxt-undici 2.0.41 → 2.0.43

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.
package/lib/index.js CHANGED
@@ -130,6 +130,7 @@ export async function request(url, opts) {
130
130
  url,
131
131
  method,
132
132
  body: opts.body,
133
+ query: opts.query,
133
134
  headers,
134
135
  origin: url.origin,
135
136
  path: url.path ?? (url.search ? `${url.pathname}${url.search ?? ''}` : url.pathname),
@@ -9,6 +9,7 @@ class Handler {
9
9
  this.decoder = null
10
10
  this.headers = null
11
11
  this.body = null
12
+ this.opts = opts
12
13
  }
13
14
 
14
15
  onConnect(abort) {
@@ -66,7 +67,10 @@ class Handler {
66
67
  Error.stackTraceLimit = 0
67
68
  try {
68
69
  this.handler.onError(
69
- createHttpError(this.statusCode, { headers: this.headers, body: this.body }),
70
+ createHttpError(this.statusCode, {
71
+ ureq: this.opts,
72
+ ures: { statusCode: this.statusCode, headers: this.headers, body: this.body },
73
+ }),
70
74
  )
71
75
  } finally {
72
76
  Error.stackTraceLimit = stackTraceLimit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "2.0.41",
3
+ "version": "2.0.43",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",