Postmark v2.5.0 & v2.5.1 Has Cryptic XMLHttpRequest IssuesSee original GitHub issue
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.
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
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
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 in
node, 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: