diff --git a/pkg/app/handlers.go b/pkg/app/handlers.go index 2281d37..540b79e 100644 --- a/pkg/app/handlers.go +++ b/pkg/app/handlers.go @@ -103,6 +103,7 @@ func (h *HttpHandlers) ExampleFileHandler(w http.ResponseWriter, r *http.Request if err != nil { log.Panic(err) } + return } return default: @@ -125,8 +126,12 @@ func (h *HttpHandlers) HealthCheckHandler(w http.ResponseWriter, r *http.Request if err != nil { log.Printf("Server is not healthy") w.WriteHeader(http.StatusInternalServerError) + w.Header().Set("Content-type", "application/json") + _, err = w.Write([]byte(`{"message": "Failed processing file"}`)) + if err != nil { + log.Panic(err) + } return } w.WriteHeader(http.StatusOK) - log.Println(w, "OK") } diff --git a/pkg/generator/resume.go b/pkg/generator/resume.go index 2d9bab8..58e0097 100644 --- a/pkg/generator/resume.go +++ b/pkg/generator/resume.go @@ -38,6 +38,5 @@ func CheckVersion() error { log.Println(out.String()) return errors.New("latex backend not available") } - log.Println("Latex backend available") return err }