Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upCachet returns bad request if component_status is missing in request #1789
Comments
|
Please let us know the exact HTTP request you are sending to cachet. |
|
So, this is only an issue when you're creating a new incident? And you're not supplying a component to update? |
|
This issue can be reproducible here https://docs.cachethq.io/docs/incidents. See https://www.youtube.com/watch?v=HKEgEpj5-9w&feature=youtu.be. As noted earlier, when you get back a HTTP 400 (syntax failure) when creating a new incident with component_id supplied but missing component_status. The incident is still created regardless. Although the documentation isn't clear if component_status is required when supplying component_id. I reference other bug reports, the incident is still created, although a failure occured. Regards |
|
This is not a bug If you supply the In v2.3.0 we've fixed the issue where the issue was still being created, regardless of the error. @GrahamCampbell is there anything we can do to fix the error message? I think we've discussed this previously. |
|
This finally makes sense to me now 'Component to update. (Required with component_status)', the wording threw me off. Regards |
|
Sorry about that @lhorace, I'll get the documentation updated when I can :) |
|
No problem, take your time :) |
Before submitting your issue, please make sure that you've checked all of the checkboxes below.
php -vrm -rf bootstrap/cache/*from the root of your Cachet installation.To help us better understand your issue, please answer the following — cheers!
Your setup
2.2.1
MySQL
5.6.99-hhvm
Hello,
While testing https://github.com/mpellegrin/nagios-eventhandler-cachet with Cachet. Upon creating incidents, the server appears to incorrectly respond with HTTP 400 BAD REQUEST, and throws an exception:
Although the validation check has failed, it still continues to process the request, and create the incident.
Seems like issue CastawayLabs/cachet-monitor#28 is related.
Upon further investigation, it appears your request will fail validation if you supply component_id without component_status. Although https://docs.cachethq.io/docs/incidents doesn't state component_status as a requirement to component_id, in fact, it's reverse.
Here's my working copy of the script:
https://scm.lhprojects.net/LHProjects-Network/Scripts/files/db154bb6ca895d4ce1582b31f4cc174ce3b6a8d4/cachet_notify
Expected behaviour
Return HTTP 200
Actual behaviour
Returns HTTP 400 and the incident is created regardless.
Steps to reproduce
Regards