Repository navigation
fix(fal_ai): raise BadRequestError when an image edit request has no image - #52529
Open
shadowmodder wants to merge 4 commits into
Open
shadowmodder wants to merge 4 commits into
shadowmodder wants to merge 4 commits into
Conversation
…image Signed-off-by: shadowmodder <sudhirvissa@gmail.com>
…image Signed-off-by: shadowmodder <sudhirvissa@gmail.com>
…image Signed-off-by: shadowmodder <sudhirvissa@gmail.com>
…image Signed-off-by: shadowmodder <sudhirvissa@gmail.com>
Contributor
PR overviewNo security issues were found in this pull request. Reviews
|
This branch has not been deployed
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.
Handwritten 1-3 sentence description
[insert handwritten description here]
Details
TLDR
Problem this solves:
How it solves it:
User Flow
Before: a caller sends an image edit request with no image
After: the same request fails as a client error
Relevant issues
Fixes #52525
Screenshots / Proof of Fix
E2E exception at base da8c02b. The full diff is two exception raises in the request transformation, and the contract is the exception type and status code the transformation raises, which the checks below prove directly. No Fal AI API key is available in my sandbox, so no live provider call was run.
Reproduction script (calls transform_image_edit_request on both configs with image=[] and image=None, 4 cases):
Tests:
One scope note: the flux lora depth config has a separate check that raises ValueError when more than one image is given. The issue does not name that check, so this PR leaves it unchanged.
Type
Bug Fix