Commit be9a028
committed
Add negotiated error pages and use them
Introduce a self-contained, content-negotiated error page renderer (HTML/JSON/text) in crates/nexide/src/server/error_page.rs and tests. Integrate it into the server by wiring it into next_bridge and static_assets so dispatch failures and handler errors return polished responses (with optional machine-readable detail) instead of plain text. Update module registration in server/mod.rs. Improve runtime polyfill cjs_loader.js to track a moduleStack so dynamic imports without an explicit referrer resolve relative to the calling module, and add a test for that behavior in crates/nexide/tests/cjs_loader.rs. Finally, bump workspace version to 0.1.15 in Cargo.toml and update Cargo.lock accordingly.1 parent 793debf commit be9a028
8 files changed
Lines changed: 440 additions & 34 deletions
File tree
- crates/nexide
- runtime/polyfills
- src/server
- tests
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
| |||
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
123 | 137 | | |
124 | 138 | | |
125 | 139 | | |
| |||
0 commit comments