Altinn / Altinn/app-frontend-react
Options failing to fetch should block PDF generation
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description of the bug
If an option query fails, the PDF will just show the option value. Instead it should fail and let the user retry. Options are usually simple json files that rarely fail to fetch, however, apps can also implement option lists through code with any kind of external dependency which may fail for unkown reasons. In the browser normally this is not a huge issue, the layout will look a bit weird but the user can always refresh the page. But a PDF generated successfully is permanent, so we should not accept potentially saving incorrect data there.
https://github.com/Altinn/app-frontend-react/pull/3840#issuecomment-3502246948
### Steps To Reproduce
1. Instantiate an app with options and fill it out
2. Go to `?pdf=1`
3. Block the options request in browser dev tools
4. Summary should show the option value (not label) and readyForPrint is present
### Additional Information
_No response_
Contributor guide
Research direction
Start at the PDF flow exercised by `?pdf=1` and trace how an options request failure affects the summary and `readyForPrint`. Reproduce the issue by blocking the options request in browser dev tools; done when PDF generation is blocked and the user can retry instead of accepting the option value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100