reacherhq / check-if-email-exists

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
https://reacher.email
Other
4.29k stars 328 forks source link

Request doesn't fail with wrong syntax #1326

Closed zagoli closed 10 months ago

zagoli commented 1 year ago

Email Provider

No response

Version of check-if-email-exists (if running it yourself)

latest

What happened?

I send a request with the following wrong syntax: { "to-email" : "example@gmail.com" }. Note the wrong to-email instead of to_email.

I expect this request to fail with an http error. Instead the response is 200 OK with the field is_reachable set to invalid.

Relevant log output

No response

amaury1093 commented 11 months ago

"to-email" will simply be ignored, just like any other fields.

The questions here is if we omit "to_email", or even if we manually put "to_email": "", should it check the empty string, or should it fail early.

In the backend, I'm okay to fail early with a HTTP error. @zagoli would you like to create a PR?

zagoli commented 11 months ago

Ok I'll try to do it