Cook icon indicating copy to clipboard operation
Cook copied to clipboard

Better error messaging when Context-Type header is missing

Open shamsimam opened this issue 7 years ago • 0 comments

$ curl http://localhost:12321/rawscheduler -X POST -d '{"jobs":[{"name":"test_job_1","max-retries":1,"mem":16,"uuid":"6bf88817-c6f1-4141-8504-c306a9b858c3","command":"echo Hello","cpus":0.1}]}'
{"errors":"(not (map? nil))"}
$ curl http://localhost:12321/rawscheduler -X POST -H"Content-Type: application/json" -d '{"jobs":[{"name":"test_job_1","max-retries":1,"mem":16,"uuid":"6bf88817-c6f1-4141-8504-c306a9b858c3","command":"echo Hello","cpus":0.1}]}'
submitted jobs 6bf88817-c6f1-4141-8504-c306a9b858c3

There should be better error messaging on why the request failed instead of the errors map above.

shamsimam avatar Mar 01 '18 20:03 shamsimam