Report Widgets Core: Add support for fetch failures
Context
For &7066 (closed) we need to display an error message when fetchCollapsedData
fails.
The widget base does not provide an easy hook / message to display a failure message or handle the error.
Required reading
Please ensure that:
- all the code written implements the rules of Accessibility https://design.gitlab.com/regions/merge-request-reports#accessibility
- you're familiar with the overall goal https://www.figma.com/file/qEddyqCrI7kPSBjGmwkZzQ/Component-library?node-id=38193%3A30482
Task
Add support for rendering a failure message when a fetch fails. Possible solutions:
- Add a
i18n.failure
option. - Add a hook to call when fetching fails with the error.
Edited by Jiaan Louw