Potential security vulnerability regarding Hosted Interface API?
# 🐛 Bug

## Information

Model I am using (Bert, XLNet ...): distilbert-base-cased-distilled-squad with huggingface.co's API

Language I am using the model on (English, Chinese ...): English

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [X] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [X] my own task or dataset: Question and answering

## To reproduce

Steps to reproduce the behavior:

Run this code on a notebook
```
answer = requests.post('https://api-inference.huggingface.co/models/distilbert-base-cased-distilled-squad', 
                       headers = {"Content-Type": "application/json"},
                       data = {"question":'What is my name?' ,
                              "context" :"My name is Batik"})
```

Result : 500 Error . With the following content when I executed `print(answer.content)`

```
b'{"error":"JSONDecodeError(\'Expecting value: line 1 column 1 (char 0)\')","traceback":"  File \\"/home/hf/api-inference/server.py\\", line 251, in model_forward\\n    inputs = await request.json()\\n  File \\"/home/hf/api-inference/.env/lib/python3.8/site-packages/starlette/requests.py\\", line 227, in json\\n    self._json = json.loads(body)\\n  File \\"/usr/lib/python3.8/json/__init__.py\\", line 357, in loads\\n    return _default_decoder.decode(s)\\n  File \\"/usr/lib/python3.8/json/decoder.py\\", line 337, in decode\\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\\n  File \\"/usr/lib/python3.8/json/decoder.py\\", line 355, in raw_decode\\n    raise JSONDecodeError(\\"Expecting value\\", s, err.value) from None\\n"}'
```

## Expected behavior

I imagine we don't want to give the Error traceback for security reasons

## Environment info

I tried using Python's request and Postman and have the same outcome. Furthermore, I'm wondering why I have a Error 500.  Was my code wrong?

Your `requests` syntax is incorrect, you're not actually sending the request body as json.

This works:
```python
answer = requests.post(
    "https://api-inference.huggingface.co/models/distilbert-base-cased-distilled-squad",
    json={"question": "What is my name?", "context": "My name is Batik"},
)
```

Regarding the stack trace, I do not see an issue with returning it (it's json-encoded), happy to discuss more.