Closed SuperSonicHub1 closed 12 months ago
$ curl \ > -X POST \ > -H "Accept: application/vnd.github.v3+json" \ > https://api.github.com/markdown \ > -d '{"text":"text"}' <p>text</p>
Since ghapi always expects a JSON response, this causes a json.JSONDecodeError to be raised.
json.JSONDecodeError
My current workaround is really hackish:
try: rendered_readme = api.markdown.render( b64decode(readme["content"]).decode() ) except JSONDecodeError as e: rendered_readme = e.doc
Anyone gonna handle this?
Since ghapi always expects a JSON response, this causes a
json.JSONDecodeError
to be raised.My current workaround is really hackish: