aboutsummaryrefslogtreecommitdiff
path: root/server/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/web.go')
-rw-r--r--server/web.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/web.go b/server/web.go
index a32dd40..5677429 100644
--- a/server/web.go
+++ b/server/web.go
@@ -228,9 +228,12 @@ func listCertsJSONHandler(a *appContext, w http.ResponseWriter, r *http.Request)
}
includeExpired, _ := strconv.ParseBool(r.URL.Query().Get("all"))
certs, err := certstore.List(includeExpired)
+ if err != nil {
+ return http.StatusInternalServerError, err
+ }
j, err := json.Marshal(certs)
if err != nil {
- return http.StatusInternalServerError, errors.New(http.StatusText(http.StatusInternalServerError))
+ return http.StatusInternalServerError, err
}
w.Write(j)
return http.StatusOK, nil