Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make customer.io happy with the Content-Type (#5)
Fixes: ``` Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/async_customerio/client_base.py", line 79, in send_request raise AsyncCustomerIOError(f"{result_status}: {url} {json_payload} {raw_cio_response.text}") async_customerio.errors.AsyncCustomerIOError: 400: https://api-eu.customer.io/v1/send/email {...} { "meta": { "error": "Non-JSON content type application/json; UTF-8 in request header." } } During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for return fut.result() File "/app/worker/jobs.py", line 18, in send_email return await customerio.send_email(request) File "/usr/local/lib/python3.10/site-packages/async_customerio/api.py", line 136, in send_email return await self.send_request( File "/usr/local/lib/python3.10/site-packages/async_customerio/client_base.py", line 83, in send_request raise AsyncCustomerIOError( async_customerio.errors.AsyncCustomerIOError: Failed to receive valid response after 3 retries. Check system status at http://status.customer.io. Last caught exception -- <class 'async_customerio.errors.AsyncCustomerIOError'>: 400: https://api-eu.customer.io/v1/send/email {...} { "meta": { "error": "Non-JSON content type application/json; UTF-8 in request header." } } ```
- Loading branch information