huggingface / text-embeddings-inference

A blazing fast inference solution for text embeddings models
https://huggingface.co/docs/text-embeddings-inference/quick_tour
Apache License 2.0
2.55k stars 158 forks source link

Better HTTP Status Code for Empty Requests #365

Open mbbyn opened 1 month ago

mbbyn commented 1 month ago

System Info

(I don't think it's necessary)

Information

Tasks

Reproduction

image

Expected behavior

HTTP status 400 is more appropriate IMHO. The 413 status code is causing red-herring, wild goose-chase, witch-hunting, etc. For example, when integrated with Dify, dify translates the 413 to Payload too large, but there is not payload to begin with.

mbbyn commented 1 month ago

Related https://github.com/langgenius/dify/issues/6807