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

The API returns 200 even though the JSON is malformed #61

Closed
JoffreyGermainUpSlide opened this issue Jun 28, 2023 · 1 comment · Fixed by #66
Closed

The API returns 200 even though the JSON is malformed #61

JoffreyGermainUpSlide opened this issue Jun 28, 2023 · 1 comment · Fixed by #66
Labels
enhancement New feature or request

Comments

@JoffreyGermainUpSlide
Copy link

For example, when providing a JSON payload formed as follow:

{
   "from": "[email protected]"
}

instead of:

{
   "from": {
      "email": "[email protected]",
      "name": "Test"
   }
}

This SendGrid Mock will return a 200 response, an email will be stored in the docker image and it will be displayed in the UI with an empty "from" value.

The original SendGrid API however returns a 4XX response.
Would it be possible to mimic their error handling to get a mock as close as possible from the SendGrid API ?

@janjaali janjaali added the enhancement New feature or request label Jul 9, 2023
@janjaali
Copy link
Owner

janjaali commented Jul 9, 2023

Sure, we can and should fix this. Will check within the next days weeks.

janjaali added a commit that referenced this issue Aug 6, 2023
* Verify JSON schema on send mails endpoint (#61).

* Bump version to `1.9.0`.

* Add LICENSE (#62).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants