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

Better error feedback #1074

Open
amaury1093 opened this issue Mar 3, 2022 · 1 comment
Open

Better error feedback #1074

amaury1093 opened this issue Mar 3, 2022 · 1 comment

Comments

@amaury1093
Copy link
Member

When there's an error on the SMTP step, we return a Err(SmtpError::<some error>). There are cases where the error is not descriptive enough: io: incomplete, future timed out...

Proposal 1: Add the STMP step in the response

{
  // snip
  "smtp": {
    "error": {
      "type": "SomeError",
      "message": "future timed out",
+     "step": "connect" // or "helo", "mail_from", "rcpt_to", "close", to know on which step it's timing out
    }
  }
}

Proposal 2: Add all logs in the reponse (optional)

When checking an email, we can add an option to include logs in the response.

{
  // snip
  "smtp": {
    "error": {
      "type": "SomeError",
      "message": "future timed out",
    }
  },
+ "logs": [
+    "line1..."
+    // snip
+ ]
}
@Nyceane
Copy link

Nyceane commented May 7, 2023

what is io: incomplete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants