api-inference-community icon indicating copy to clipboard operation
api-inference-community copied to clipboard

Error message not explicit

Open NouamaneTazi opened this issue 3 years ago • 1 comments

When posting an empty json to a text-to-image pipeline I get the error:

{
  "error": [
    "str type expected: `__root__` in `parameters`"
  ]
}

Which somehow means that I need to post a json like this:

{
    "inputs": "monkey eating banana"
}

I think we could make the errors a little more explicit

NouamaneTazi avatar Nov 17 '22 11:11 NouamaneTazi

Would you be willing to open a PR for that ? :D

Narsil avatar Nov 17 '22 12:11 Narsil