ajvb / kala

Modern Job Scheduler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only send back json in api

ajvb opened this issue · comments

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)