Skip to content

Returning apt error codes for ResolveRevision

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

Currently, whenever ResolveRevision throws an Error, a structerr.NewInvalidArgument is returned irrespective of whether the error is of type git.ErrReferenceNotFound or not.

However, it is better to let the client know definitively if the revision is invalid or not so they can decide if they want to retry.

This MR closes issue #4712 . This code refactoring improves error handling and reporting throughout the codebase. It ensures that error messages are clear, informative, and include relevant metadata. This will make it easier for developers to debug and fix issues.

Edited by Jaydeep Das

Merge request reports

Loading