@nxtedition/nxt-undici 6.4.15 → 6.4.16

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
@@ -133,7 +133,7 @@ function wrapDispatch(dispatcher) {
133
133
  lookup: opts.lookup ?? defaultLookup,
134
134
  },
135
135
  handler,
136
- )
136
+ )?.catch((err) => handler.onError(err))
137
137
  },
138
138
  )
139
139
  dispatcherCache.set(dispatcher, wrappedDispatcher)
@@ -88,7 +88,7 @@ export default () => (dispatch) => {
88
88
  const [err, val] = await resolve(hostname, { ttl })
89
89
 
90
90
  if (err) {
91
- throw err
91
+ throw Object.assign(new Error('lookup failed: ' + err.message), { cause: err })
92
92
  }
93
93
 
94
94
  records = val
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "6.4.15",
3
+ "version": "6.4.16",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",