ajvb / kala

Modern Job Scheduler
MIT License
2.13k stars 187 forks source link

Only send back json in api #163

Closed ajvb closed 6 years ago

ajvb commented 6 years ago

In places like https://github.com/ajvb/kala/blob/master/api/api.go#L130, we use http.Error, which sends back the error in plaintext. This should really be swapped for something similar to uses {"error": ...} format and is explicitly JSON (sets correct content-type header value)