Skip to content
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

Improve error reporting for email sender #2266

Open
infomiho opened this issue Sep 3, 2024 · 2 comments
Open

Improve error reporting for email sender #2266

infomiho opened this issue Sep 3, 2024 · 2 comments
Labels
shouldfix We should do/fix this at some point

Comments

@infomiho
Copy link
Contributor

infomiho commented Sep 3, 2024

Looking at the stack trace in this Discord thread it's obvious we are not outputting the full error which is crucial for successful debugging. Also, we could maybe recognise common sets of errors and give extra info to the user like "it looks like you received a 403 error, did you set up the sending email properly?" and similar.

@infomiho infomiho added the enhancement New feature or request label Sep 3, 2024
@Martinsos Martinsos added shouldfix We should do/fix this at some point and removed enhancement New feature or request labels Sep 4, 2024
@Martinsos
Copy link
Member

@sodic
Copy link
Contributor

sodic commented Oct 16, 2024

I'm copying the message from the original Discord thread for easier searching:

[ Server!] Failed to send email ResponseError: Forbidden
[ Server!]     at /home/kaloyan/projects/podcast-FE/app/node_modules/@sendgrid/client/src/classes/client.js:146:29
[ Server!]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[ Server!]   code: 403,
[ Server!]   response: {
[ Server!]     headers: {
[ Server!]       server: 'nginx',
[ Server!]       date: 'Mon, 02 Sep 2024 10:41:16 GMT',
[ Server!]       'content-type': 'application/json',
[ Server!]       'content-length': '281',
[ Server!]       connection: 'keep-alive',
[ Server!]       'access-control-allow-origin': 'https://sendgrid.api-docs.io',
[ Server!]       'access-control-allow-methods': 'POST',
[ Server!]       'access-control-allow-headers': 'Authorization, Content-Type, On-behalf-of, x-sg-elas-acl',
[ Server!]       'access-control-max-age': '600',
[ Server!]       'x-no-cors-reason': 'https://sendgrid.com/docs/Classroom/Basics/API/cors.html',
[ Server!]       'strict-transport-security': 'max-age=600; includeSubDomains'
[ Server!]     },
[ Server!]     body: { errors: [Array] }
[ Server!]   }
[ Server!] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shouldfix We should do/fix this at some point
Projects
None yet
Development

No branches or pull requests

3 participants