PDF export silently fails to start when job creation is rejected #22

Closed
opened 2026-10-31 14:32:27 +00:00 by Gilles · 0 comments
Owner

Clicking "Exporter en PDF" (either the draft-state button or a validated version's) calls createCurrentStatePdfExportJob/createPdfExportJob, which reject whenever the backend's POST /api/pdf-export-jobs/ doesn't return 2xx (permission denied, validation error, 500, ...). exportPdf/exportCurrentState in ProjectVersionsView.vue have no try/catch, so the rejection becomes an unhandled promise rejection: the button never flips to a status chip, and no PDF link ever appears -- with zero feedback to the user about what happened.

Reported by the user: clicking the button does nothing visible, no "en attente" chip, no PDF link.

Fix: catch the error in both functions and surface a visible message, same convention already used by load()'s error ref and doValidate's validateErrors.

Clicking "Exporter en PDF" (either the draft-state button or a validated version's) calls `createCurrentStatePdfExportJob`/`createPdfExportJob`, which reject whenever the backend's POST `/api/pdf-export-jobs/` doesn't return 2xx (permission denied, validation error, 500, ...). `exportPdf`/`exportCurrentState` in `ProjectVersionsView.vue` have no try/catch, so the rejection becomes an unhandled promise rejection: the button never flips to a status chip, and no PDF link ever appears -- with zero feedback to the user about what happened. Reported by the user: clicking the button does nothing visible, no "en attente" chip, no PDF link. Fix: catch the error in both functions and surface a visible message, same convention already used by `load()`'s `error` ref and `doValidate`'s `validateErrors`.
Sign in to join this conversation.
No description provided.