License Compliance report in pipeline page does not indicate if an error occurred
Summary
When you look at a pipeline which ran the license compliance job, if there's an error when fetching the report, the UI does not indicate that there was an error.
Steps to reproduce
This is kind of hard to reproduce naturally, since the endpoint rarely returns an error status. I've only noticed this because in development, the endpoint was returning a 500 due to the class autoreloading in rails 6 breaking some things.
Example Project
Any project with license compliance configured.
What is the current bug behavior?
The UI displays no error, saying only License Compliance detected no licenses for the source branch only
:
What is the expected correct behavior?
The UI should display Failed to load License Compliance report
, and not show a green check mark.
Possible fixes
The error action is not passing the exception object through to the mutation, which expects it. So the fix is to pass it through. Alternatively, the mututation could simply set the loadLicenseReportError
state to true
, since nothing seems to depend on the actual thrown exception.