-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MailJet broken on Cloudflare workers due to Axios RequestInitializerDict being broken in 1.7.4 (fixed in 1.7.5) #285
Comments
Here is the full error message from mailjet api
|
I actually haven't been able to resolve this using overrides in my package.json In any case, according to the issues on axios, this seems on their end, and resolved currently |
So, i worked around this by using the api directly: https://api.mailjet.com/v3/send Maybe remove dependencies from Axios, and simply implement the fetch yourself ? If you need advanced functionality over fetch, have a look at ofetch, which is what is used in nuxt and other libraries, and uses fetch under the hood, which is compatible in both browser and nodejs clients https://github.com/unjs/ofetch Btw, you could add an example on the API page, showing how to use JS to do the fetch stuff Here what i replaced the nodejs library with:
|
There is the cURL example here : https://dev.mailjet.com/email/guides/send-api-v31/ |
You can't use this on the client, which i suppose you are doing (maybe with some tweaks, but probably not) My fetch code is executed on the server by nodejs, not in the browser. This works fine on the server (easy to adapt to plain java, c#, php, etc), without using any library dependency: |
That makes sense... |
Mailjet is broken on Cloudflare, and when using NuxtJS projects deployed on NuxtHub
Sending a mail triggers a 500 error :
The 'credentials' field on 'RequestInitializerDict' is not implemented.
This is apparently due to this issue with Axios
axios/axios#6565
As mentioned here
axios/axios#6565 (comment)
Solution:
Upgrade MailJet Axios dependency to at least 1.7.5 (currently 1.7.7)
The text was updated successfully, but these errors were encountered: