Change StringIO to string.
Fix docstrings and spelling.
In case of bad request send 400 with error message.