fix
This commit is contained in:
@@ -20,6 +20,7 @@ func Take(w http.ResponseWriter, r *http.Request) {
|
||||
queue := r.Header.Get("queue")
|
||||
task, err := tasks.Take(queue)
|
||||
if err != nil {
|
||||
println("Error taking")
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
@@ -37,6 +38,7 @@ func Take(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
data, err := json.Marshal(response)
|
||||
if err != nil {
|
||||
println("Error marshalling")
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user