Show package processing error message returned from API
What does this MR do and why?
Show package processing error message returned from API
The status_message
was added to package GraphQL payload
in !134183 (merged)
These need to be displayed in the packages list page in 2 places:
- Within the alert
- Next to individual errored package.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
On your rails console bundle exec rails c
- Find the project where you want to work with the package registry
p = Project.find(<project_id>)
- Create a package
FactoryBot.create(:npm_package, project: p)
- Update the status of the package to
ERROR
Packages::Package.last.update(status: :error)
- Go to the package registry using the sidebar or via the URL
<hostname>/<project>/-/packages
. Confirm that default error message is shown. - Update the status message of the error package
Packages::Package.last.update(status_message: 'custom error message')
. - Refresh the package registry list page
<hostname>/<project>/-/packages
. Confirm that custom error message is shown.
Related to #330515 (closed)