Fixed bug where the content header was not being passed onto the post

request. Changed data => json.

Added extra logging to display the error with more detail
This commit is contained in:
Richard Chapman
2018-03-06 14:42:53 +00:00
parent d0df85a602
commit ed9936bba0
2 changed files with 4 additions and 2 deletions

View File

@@ -266,7 +266,7 @@ def _get_png_preview(url, data, notification_id):
resp.content
))
raise InvalidRequest(
'Error generating preview letter for {} \nStatus code: {}\n{}'.format(
'Error generating preview letter for {}\nStatus code: {}\n{}'.format(
notification_id,
resp.status_code,
resp.content