braid-http 1.0.3 → 1.0.4

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.
@@ -350,7 +350,11 @@ async function braid_fetch (url, params = {}) {
350
350
  case 504: // Gateway Timeout
351
351
  give_up = false;
352
352
  }
353
- if (give_up) return fail(new Error(`giving up because of http status: ${res.status}${(res.status === 401 || res.status === 403) ? ` (access denied)` : ''}`))
353
+ if (give_up) {
354
+ let e = new Error(`giving up because of http status: ${res.status}${(res.status === 401 || res.status === 403) ? ` (access denied)` : ''}`)
355
+ subscription_error?.(e)
356
+ return fail(e)
357
+ }
354
358
  if (!res.ok) throw new Error(`status not ok: ${res.status}`)
355
359
  }
356
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"