Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change message when empty #55

Merged
merged 9 commits into from
Jan 20, 2025
5 changes: 3 additions & 2 deletions registry/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,10 @@ func (h Handler) GetSchemas(w http.ResponseWriter, _ *http.Request) {
schemas, err := h.Service.GetSchemas()
if err != nil {
if errors.Is(err, registry.ErrNotFound) {
body, _ := json.Marshal(report{Message: "No active schemas registered in the Registry"})
writeResponse(w, responseBodyAndCode{
Body: serializeErrorMessage("No active schemas registered in the Registry"),
Code: http.StatusNoContent,
Body: body,
Code: http.StatusOK,
})
return
}
Expand Down
Loading