Add status_message to the package GraphQL payload
🌱 Context
When a package fails to upload to the GitLab Package Registry, we display only a generic message in the UI. The message does not give the user much insight into what went wrong and makes it difficult for them to know how to resolve the issue.
In Add`status_message` to the package model (!122299 - merged), a new column status_message
was added to the package model. This column stores a descriptive error message that could help debug what went wrong when uploading a package.
We want the UI to be able to display this message to the user. To do so, we need to return its value in the GraphQL package payload.
The error message should be displayed on the page that lists the packages in the UI. On this page, the Types::Packages::PackageBaseType
is used to access the package data. That's why the status_message
should be added to Types::Packages::PackageBaseType
in order to be accessible on the packages list page.
What would be needed in the frontend MR is to add statusMessage
to the PackageData fragment. We can then display the message to the user instead of the static used error messages.
🚒 Solution
- Add
status_message
field to Types::Packages::PackageBaseType