Skip to content

Commit

Permalink
return a StatusNotImplemented when there is no error getting data but…
Browse files Browse the repository at this point in the history
… data is nil (for sqlite case)
  • Loading branch information
JudahNour committed Aug 11, 2023
1 parent a4cef53 commit aaa22d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func (m *DB) ServeEnvCharts(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if data == nil {
http.Error(w, err.Error(), http.StatusNotImplemented)
return
}
jsonData, err := json.Marshal(data)
if err != nil {
http.Error(w, "Failed to marshal JSON", http.StatusInternalServerError)
Expand Down

0 comments on commit aaa22d2

Please sign in to comment.