Add pyjwt to requirements
Fix response from generic in case of error

It should dump the json object to a string.