Skip to content

Introduced generic error metadata and improve updateref errors

Patrick Steinhardt requested to merge pks-update-ref-improved-errors into master

This MR introduces the ability to attach error metadata to generic errors via a new ErrorMetadater interface. If implemented, a custom error type can attach error metadata to itself that will then get propagated to our log messages as usual for the structerr metadata.

Equipped with this new functionality we then refactor the updateref package to provide more meaningful errors, finally getting rid of the dreaded "Could not update $ref. Please refresh and try again." error in favor of actually spelling out the root cause of why the reference update has failed.

Merge request reports