fix: changed html error code to the correct one

Refs: OPS-54
This commit is contained in:
0xjrx 2025-03-21 15:31:51 +01:00
parent 1ca1bc525b
commit 36c3d0a83f
No known key found for this signature in database
GPG key ID: 61C53033867D0271

View file

@ -75,7 +75,7 @@ def generate_haiku():
json_data = request.get_json() json_data = request.get_json()
prompt = json_data["prompt"] prompt = json_data["prompt"]
if len(prompt)>100: if len(prompt)>100:
return "Unprocessable Entity", 422 return "Content Too Large", 413
haiku = Haiku.request_haiku(prompt) haiku = Haiku.request_haiku(prompt)
id = store.save_haiku(haiku) id = store.save_haiku(haiku)
return str(id) return str(id)