Skip to content

Commit

Permalink
Merge pull request #23 from thomasoca/reduce-health-check-log
Browse files Browse the repository at this point in the history
Reduce health check log
  • Loading branch information
thomasoca authored May 13, 2023
2 parents fe3269f + 1f739b4 commit 27c32bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pkg/app/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (h *HttpHandlers) ExampleFileHandler(w http.ResponseWriter, r *http.Request
if err != nil {
log.Panic(err)
}
return
}
return
default:
Expand All @@ -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")
}
1 change: 0 additions & 1 deletion pkg/generator/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 27c32bb

Please sign in to comment.