You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose the failure on the exception the client raises #97
The client raises the application's own exception classes with failure.to_s as the message (client.rb:203). An application that needs the failure's code or cause must parse the message. HEY does exactly that to show a lock placeholder for a password-protected PDF: it matches mutool's stderr inside the message (encryption_aware_pdf_previewer.rb:27).
Urgency
Low. Nothing is broken today, because Codes documents the message format. This change matters once a cell sends causes an application acts on, such as the protected cause in #96. Without it, an application still has to parse the message to read that cause.
Implementation suggestion
Donal's carry-the-failure branch (4cdf8fa1) extends each raised exception with a HotCell::Verdict module. The module exposes the HotCell::Failure as hot_cell_failure, so an application reads error.hot_cell_failure.cause. It can also rescue HotCell::Verdict, whatever classes its registration injected. The branch includes tests in hotcell-client/test/classification_test.rb. To finish it, rebase onto master, document the module in docs/client-api.md and docs/codes.md, and add a changelog entry.
Activity
Document HotCell::Verdict and add a changelog entry
Document HotCell::Verdict and add a changelog entry