Better error messages for package processing errors
Proposal
In #324206 (closed) we added an error status to the package model to allow us to display when a package was in an "error" state after failing background processing and also a "pending" state during background processing.
We should add a status_message
column to the package model to capture the actual error that occurred so we can give the user more information about why a package upload has failed.
Benefits
Users will see if the failure was due to an internal error (500), or if it was due to something like some data being invalid such as the name or version of the package. Users will be able to debug their problems more quickly with this information.
Implementation plan
-
Add new status_message
column to the package model -
Update the extraction workers to add the message to this column: package_file.package.update_column(:status_message, e.message)
-
Add the column to the GraphQL payload -
Display the message on the frontend (may require some UX input)
Edited by Steve Abrams