Postmark v2.5.0 & v2.5.1 Has Cryptic XMLHttpRequest Issues
See original GitHub issueWhen using postmark.TemplatedMessage
and sendEmailBatchWithTemplates
I get an odd error without a lot of description. Downgrading to 2.3.5 fixes this issue. The problem is present in both 2.5.0 & 2.5.1.
Message:
PostmarkError: The string did not match the expected pattern.
at ErrorHandler.Object.<anonymous>.ErrorHandler.buildGeneralError (/Users/zjr/Developer/Current/csns/node_modules/postmark/src/client/ErrorHandler.ts:37:16)
at ErrorHandler.Object.<anonymous>.ErrorHandler.buildRequestError (/Users/zjr/Developer/Current/csns/node_modules/postmark/src/client/ErrorHandler.ts:23:25)
at /Users/zjr/Developer/Current/csns/node_modules/postmark/src/client/BaseClient.ts:116:41
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Postmark v2.5.0 & v2.5.1 Has Cryptic XMLHttpRequest Issues #61
When using postmark.TemplatedMessage and sendEmailBatchWithTemplates I get an odd error without a lot of description. Downgrading to 2.3.5 fixes this issue.
Read more >XMLHttpRequest - Web APIs | MDN
Chrome Edge
XMLHttpRequest Full support. Chrome1. Toggle history Full support. Edge12...
XMLHttpRequest() constructor Full support. Chrome1. Toggle history Full support. Edge12...
abort Full support. Chrome1. Toggle...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @hequ
thanks for details! I add them to the wiki.
Just commenting here if anyone encounters this in the future. I got this same error when running tests with jest and using postmark client 2.7.4. Jest runs by default in
jsdom
mode so it has a window. When I changed jest to run innode
, this error went away. Apparently, Axios is doing something funny in a browser context.If you are interested, there are a couple of related errors which might help to understand the core reason:
https://github.com/facebook/jest/issues/5737 https://github.com/axios/axios/issues/1180