fix: surface PDF export job creation failures instead of failing silently #23

Merged
Gilles merged 1 commit from fix/pdf-export-silent-failure into main 2026-10-31 15:03:48 +00:00
Owner

Summary

  • exportPdf/exportCurrentState (ProjectVersionsView.vue) called createPdfExportJob/createCurrentStatePdfExportJob with no try/catch -- a rejected POST (permission denied, validation error, server error...) became an unhandled promise rejection: the button stayed inert, no status chip, no PDF link, no error. This matches exactly what was reported.
  • Added an exportError ref, caught in both functions, shown as a banner next to the template hint -- same convention already used by load()'s error ref and doValidate's validateErrors.

Test plan

  • New test: job creation rejected with 403 -> error message shown, button still present, no job added.
  • pnpm vitest run -- 80/80 passing.
  • pnpm build -- clean.

Closes #22.

🤖 Generated with Claude Code

https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm

## Summary - `exportPdf`/`exportCurrentState` (`ProjectVersionsView.vue`) called `createPdfExportJob`/`createCurrentStatePdfExportJob` with no try/catch -- a rejected POST (permission denied, validation error, server error...) became an unhandled promise rejection: the button stayed inert, no status chip, no PDF link, no error. This matches exactly what was reported. - Added an `exportError` ref, caught in both functions, shown as a banner next to the template hint -- same convention already used by `load()`'s `error` ref and `doValidate`'s `validateErrors`. ## Test plan - [x] New test: job creation rejected with 403 -> error message shown, button still present, no job added. - [x] `pnpm vitest run` -- 80/80 passing. - [x] `pnpm build` -- clean. Closes #22. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
fix: surface PDF export job creation failures instead of failing silently
All checks were successful
ci / unit (pull_request) Successful in 1m7s
ci / publish (pull_request) Has been skipped
2a12291d3f
createPdfExportJob/createCurrentStatePdfExportJob reject on any non-2xx
response, but exportPdf/exportCurrentState had no try/catch -- the
unhandled rejection left the button inert with no feedback, which is
exactly what was reported: no "en attente" chip, no PDF link, nothing.

Closes #22.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
Author
Owner
<!-- argus-link-bot:thierryade/frontend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/thierryade/frontend/pr/23)
Gilles merged commit 20c9919f20 into main 2026-10-31 15:03:48 +00:00
Gilles deleted branch fix/pdf-export-silent-failure 2026-10-31 15:03:48 +00:00
Sign in to join this conversation.
No description provided.