mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
Merge pull request #16140 from ibrahimsn98/master
Return HTTP 400 instead of 404 on invalid sampler error
This commit is contained in:
commit
af3ccee5c8
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user