WIP: Canvases That Do Not Resolve #435
Closed
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.
The goal is to expect Canvas URIs may not resolve, and as part of handling when they don't to look into the Project or Manifest data to see if the Canvas is embedded and can be pulled from there instead.
We are doing this because we know
CanvasURIs and objects are consistently problematic. Often the Canvas URI itself does not resolve (because having it embedded in the Manifest was considered good enough and it is kept up to date there). Since Canvases also contain the Image, they absorb the same issues for the Image. Often the Image URI is incorrect or won't resolve, or the image is moved, or a paywall in front of the image is implemented, etc.We want to ensure components and interfaces anticipate this. Components and interfaces should never hard crash in these scenarios. Failure to resolve Canvas or Image URIs should always be caught and handled. Every effort to load the Canvas data should be attempted before throwing a true "could not get canvas" error.
When a component or interface receives a "could not get canvas" or "could not get image" error, it should offer feedback to the user and give them somewhere to go or something to see other than a dead page.