docstore: Support unwrapping action list errors#3705
Merged
vangent merged 2 commits intogoogle:masterfrom Apr 20, 2026
Merged
Conversation
…rror behavior to implement joined unwrapper
Contributor
|
PTAL #3708 and see what you think. I think this solves the problem of being able to use |
vangent
requested changes
Apr 19, 2026
Contributor
|
Please also update the PR title to reflect this is just about docstore's ActionList. |
vangent
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example changes to use struct error types (see #3702 ).
While creating this PR I realized that there is already a concrete infrastructure for unwrapping driver specific errors (e.g.
docstore.ErrorAs()). Besides, I also realized that rewriting this part is currently not very simple because it would inflict breaking changes in the driver<->interface API.Therefore, I as initial step I added a new Wrap() function which simply wraps a gcerrs.Error into a code-specific struct (currently only implemented AlreadyExistsError).
The idea behind such an approach would be to slowly migrate to struct errors like this:
gcerror.ErrorAs()as it would now be possible to extract driver specific errors by simply usingerrors.As().As already explained, I do now see that this is a long, complex and especially breaking process, therefore it is up to you to decide if the effort is worth going this way.