@marianmeres/http-utils 1.15.0 → 1.16.0

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/dist/index.cjs CHANGED
@@ -296,6 +296,7 @@ const getErrorMessage = (e, stripErrorPrefix = true) => {
296
296
  // non-standard "body" is this package's HttpError prop
297
297
  body?.error?.message ||
298
298
  body?.message ||
299
+ body?.error ||
299
300
  (typeof body === 'string' ? body : null) ||
300
301
  // the common message from Error ctor (e.g. "Foo" if new TypeError("Foo"))
301
302
  e?.message ||
package/dist/index.js CHANGED
@@ -294,6 +294,7 @@ const getErrorMessage = (e, stripErrorPrefix = true) => {
294
294
  // non-standard "body" is this package's HttpError prop
295
295
  body?.error?.message ||
296
296
  body?.message ||
297
+ body?.error ||
297
298
  (typeof body === 'string' ? body : null) ||
298
299
  // the common message from Error ctor (e.g. "Foo" if new TypeError("Foo"))
299
300
  e?.message ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/http-utils",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Misc DRY http fetch related helpers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",