htmx-router 1.0.10 → 1.0.11

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/package.json +1 -1
  2. package/router.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htmx-router",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "A lightweight SSR framework with server+client islands",
5
5
  "keywords": [
6
6
  "htmx",
package/router.js CHANGED
@@ -221,6 +221,8 @@ class RouteLeaf {
221
221
  throw new Response("Method not Allowed", MakeStatus("Method Not Allowed", ctx.headers));
222
222
  }
223
223
  catch (e) {
224
+ if (e instanceof Response && e.headers.has("X-Caught"))
225
+ return e;
224
226
  return await this.error(ctx, e);
225
227
  }
226
228
  return null;