Return http 400 instead of 404 on invalid sampler

This commit is contained in:
İbrahim Süren 2024-07-03 17:33:25 +03:00
parent feee37d75f
commit 3971c01562
1 changed files with 1 additions and 1 deletions

View File

@ -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