emailjs/emailjs-smtp-client

Enhance error reporting with more detailed failure codes.

Closed this issue · 1 comments

mcav commented

The errors thrown from the BrowserBox and SmtpClient libraries don't provide many contextual details, making it difficult to report a proper error status to the user. For our implementation, we monkeypatched some changes to pass along details, such as logged-in state and IMAP/SMTP error codes, in the following files:

https://github.com/mozilla-b2g/gaia-email-libs-and-more/blob/master/js/imap/client.js
https://github.com/mozilla-b2g/gaia-email-libs-and-more/blob/master/js/smtp/client.js

It would be helpful to have native support of some format (the format needn't be identical to ours, just the information is important); in addition to passing along the errors, it may be worth inferring certain categories of errors (such as our "bad-user-or-pass" generic errors and the like).

any action on this? patches welcome :)