Only the name and message of a caught error reach the browser
The message
MARKLESS_CATCH_ERROR_FIELD_LOST: `<source>` reads `<field>` from the `@catch` error, but a server-rendered page sends the browser only the error's <kept>, so `<field>` would be missing once the page loads.
A failure caught while the server renders the page travels to the browser as page data, and an Error keeps only its name and message there. Anything else, such as `cause`, a field your own error class adds, or the class itself, is dropped.
Read `<binding>.message` or `<binding>.name` instead, and put what the page needs into the message when you throw.
MARKLESS_CATCH_ERROR_FIELD_LOST: `<source>` passes the whole `@catch` error to <<child>>, but a server-rendered page sends the browser only the error's <kept>, so any other field <<child>> reads would be missing once the page loads.
A failure caught while the server renders the page travels to the browser as page data, and an Error keeps only its name and message there. Anything else, such as `cause`, a field your own error class adds, or the class itself, is dropped.
Pass <<child>> only what it shows, such as `message={<binding>.message}`, and put what the page needs into the message when you throw.
MARKLESS_CATCH_ERROR_FIELD_LOST: `<source>` tests the `@catch` error with `instanceof`, but the browser gets the error back as its <kept> only, not as an instance of its class, so the test is false there.
A failure caught while the server renders the page travels to the browser as page data, and an Error keeps only its name and message there. Anything else, such as `cause`, a field your own error class adds, or the class itself, is dropped.
Tell errors apart by `<binding>.name` instead, and set `name` in your error class.
https://markless.dev/errors/MARKLESS_CATCH_ERROR_FIELD_LOSTWords in angle brackets change from case to case.
Why
Markless checks its own work as it builds and runs your app. This check failed, which means a bug in Markless, not in your code.
Fix
Open an issue with the message above and the steps that cause it.
Related
Where Markless raises it
Button sounds are from Josh Comeau's Button Sounds library.