Skip to content

Commit

Permalink
Merge pull request #16140 from ibrahimsn98/master
Browse files Browse the repository at this point in the history
Return HTTP 400 instead of 404 on invalid sampler error
  • Loading branch information
AUTOMATIC1111 committed Jul 6, 2024
2 parents a6c384b + 3971c01 commit af3ccee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def script_name_to_index(name, scripts):
def validate_sampler_name(name):
config = sd_samplers.all_samplers_map.get(name, None)
if config is None:
raise HTTPException(status_code=404, detail="Sampler not found")
raise HTTPException(status_code=400, detail="Sampler not found")

return name

Expand Down

0 comments on commit af3ccee

Please sign in to comment.