mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.39k stars 529 forks source link

If environmentVariables field is misspecified, Chronos returns a 500 on posting #389

Open ssk2 opened 9 years ago

ssk2 commented 9 years ago

I misunderstood the documentation and set my environmentVariables in my job JSON as follows:

"environmentVariables" : [ { "FOO" : "bar" } ]

Instead of the correct:

"environmentVariables" : [ { "name" : "FOO", "value" : "bar" } ]

There was no real error message, with the following unhelpful text being returned by httpie after POSTing:

HTTP/1.1 500 Server Error
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1290
Content-Type: text/html;charset=ISO-8859-1
Server: Jetty(8.y.z-SNAPSHOT)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /scheduler/iso8601. Reason:
<pre>    Server Error</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

</body>
</html>

It'd be nice if this could at least point to the misconfigured field.

elingg commented 9 years ago

Thanks for the docs fix @ssk2! I guess we can keep this issue open due to the lack of informative error message.