Merge pull request #16140 from ibrahimsn98/master

Return HTTP 400 instead of 404 on invalid sampler error
This commit is contained in:
AUTOMATIC1111 2024-07-06 09:42:44 +03:00 committed by GitHub
commit af3ccee5c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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