Added
- Error pages now show the exception's
#causechain,did_you_meansuggestions anderror_highlightcarets, none of which better_errors surfaced. (@afomera in #15) - For
Hanami::Router::NotFoundError, show the app's routes and suggest the closest match (e.g./books/:idfor/bookz/1), or say where to add a route. (@afomera and @timriley in #16 and #18) - Error diagnostics (experimental): error pages can explain an error and offer a fix for it, including a fix that runs from the page. (@afomera in #15, @timriley in #18)
- A "copy as text" button, putting the error, request and backtrace on the clipboard as Markdown. (@afomera in #15)
- The per-frame console now keeps a history, navigable with the up and down arrows. (@afomera in #15)
Changed
- Replace better_errors with a Hanami-native error page, styled to match
Hanami::Web::Welcome. The console and its security model carry over unchanged: loopback only, a double-submit CSRF token in an httponly cookie, and a strict Content-Security-Policy with a per-response nonce. (@afomera in #15) - Status codes now come from
config.render_error_responsesdirectly, soHanami::Router::NotFoundErrorrenders a 404 without patchingBetterErrors::Middleware#show_error_page. (@afomera in #15) - Error pages are held in a bounded registry, so more than one error page is interactive at a time. A page from before a code reload reports an expired session rather than evaluating against unloaded constants. (@afomera in #15)