nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
868 stars 265 forks source link

[BUG] HTTP 404 error (Not Found) reported for unrecognized date input to API #6144

Open elavy-harris opened 3 months ago

elavy-harris commented 3 months ago

Describe the bug HTTP 404 error (Not Found) reported for unrecognized date input to API

To Reproduce Steps to reproduce the behavior:

  1. Issue a command like the following: curl -X GET -su elavy -k "https://localhost:8443/api/channels/5c19b0fe-251b-40ce-a376-51e5951ba96e/messages?startDate=2020-01-01T00%3A00%3A00Z" -H X-Requested-With:whatever
  2. Observe that the response is a 404 error.

Expected behavior A 400 error (Bad Request) is returned, preferably with information about what's bad

Actual behavior A 404 (Not Found) error is returned.

Environment (please complete the following information):

Additional context The API apparently requires milliseconds to be included in the date parameters and a timezone in "-0500" style. The swagger page (for all appropriate messages) should describe the required format, and the error message should at least indicate that the problem is a formatting issue with the date field.