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.
Summary
I reviewed the canvas codebase to find places where errors could occur. Two categories:
Blob
)All instances of these things now have error handling at some level - either close to the error-producing code or higher up where the code is consumed.
Canvas filters were the most complex thing to handle. The filter queues a graph, waits for a specific node to finish and retrieves an output image. Handling all the possible cases requires care. There's a new method that wraps up executing a graph to get an image output into a single async function call. This is well-documented.
While iterating on filters, I made an internal change to how filter graphs are generated. Instead defining a node, filters define a graph and a node that outputs an image. This makes filters very flexible - so long as the graph has a node that outputs an image, it can be run as a filter.
See commit messages and code for details.
Related Issues / Discussions
Discord & offline discussion
QA Instructions
Hit the things that changed:
Merge Plan
n/a
Checklist