Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better diagnostics when resolvers fail #2778

Open
ewoutkramer opened this issue May 1, 2024 · 1 comment
Open

Better diagnostics when resolvers fail #2778

ewoutkramer opened this issue May 1, 2024 · 1 comment
Labels
breaking change This issue/commit causes a breaking change, and requires a major version upgrade

Comments

@ewoutkramer
Copy link
Member

The IResourceResolver interface allows resolvers to return "null" when something "cannot be resolved". But the cause of something not being resolvable remains unclear. This has caused many hours of chasing down bugs where the resource could be resolved, but (most prominently) a StructureDefiniton could not be snapshotted.

It would be way better if we could somehow return a resource OR an error. Of course, this is a massively breaking change. But smaller changes would mean the error can be easily ignored. Throwing exceptions also is not a great solution, still a lot of code is currently checking for null.

Since the most problematic of these is the SnapshotSource, a temporary "hack" to check SnapshotSource.Outcome after resolution MAY work, but its not great.

@mmsmits
Copy link
Member

mmsmits commented Aug 29, 2024

Could also throw a specific exception.
Whatever we make up, it's breaking.

@mmsmits mmsmits added the breaking change This issue/commit causes a breaking change, and requires a major version upgrade label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue/commit causes a breaking change, and requires a major version upgrade
Projects
None yet
Development

No branches or pull requests

2 participants