[GH-ISSUE #422] Valid JSON response rejected by update endpoint #313

Closed
opened 2026-02-25 23:42:00 +03:00 by kerem · 2 comments
Owner

Originally created by @msfjarvis on GitHub (Sep 5, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/422

While working on my Rust library for healthchecks (source available here) I came across a HTTP 400 response from the implementation of this API method.

The JSON I was sending is "{\"name\":\"dl_msfjarvis_dev_sync\",}" which appears to be valid according to all the JSON validators and linters I had at hand but is rejected by the site.

Is this something that can be fixed or should I attempt to work around it myself?

Originally created by @msfjarvis on GitHub (Sep 5, 2020). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/422 While working on my Rust library for healthchecks ([source available here](https://github.com/msfjarvis/healthchecks-rs)) I came across a HTTP 400 response from the implementation of [this](https://healthchecks.io/docs/api/#update-check) API method. The JSON I was sending is `"{\"name\":\"dl_msfjarvis_dev_sync\",}"` which appears to be valid according to all the JSON validators and linters I had at hand but is rejected by the site. Is this something that can be fixed or should I attempt to work around it myself?
kerem closed this issue 2026-02-25 23:42:00 +03:00
Author
Owner

@cuu508 commented on GitHub (Sep 5, 2020):

Hi @msfjarvis!

"{\"name\":\"dl_msfjarvis_dev_sync\",}" is a valid JSON string, but the API expects a JSON object:

{"name":"dl_msfjarvis_dev_sync"}

(not enclosed in quotes, no escaping for inner quotes, no trailing comma)

If I've misunderstood the question, please let me know!

<!-- gh-comment-id:687619901 --> @cuu508 commented on GitHub (Sep 5, 2020): Hi @msfjarvis! `"{\"name\":\"dl_msfjarvis_dev_sync\",}"` is a valid JSON *string*, but the API expects a JSON *object*: {"name":"dl_msfjarvis_dev_sync"} (not enclosed in quotes, no escaping for inner quotes, no trailing comma) If I've misunderstood the question, please let me know!
Author
Owner

@msfjarvis commented on GitHub (Sep 5, 2020):

That'd certainly explain it. I'll fix this on my end, thanks for the help!

<!-- gh-comment-id:687620233 --> @msfjarvis commented on GitHub (Sep 5, 2020): That'd certainly explain it. I'll fix this on my end, thanks for the help!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#313
No description provided.