PDF export silently fails to start when job creation is rejected #22
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/frontend#22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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/exportCurrentStateinProjectVersionsView.vuehave 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()'serrorref anddoValidate'svalidateErrors.