aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/core.go b/core.go
index 03db6e8..296483c 100644
--- a/core.go
+++ b/core.go
@@ -93,6 +93,7 @@ func (api *API) requestHandler(resource interface{}) http.HandlerFunc {
content, err := json.Marshal(data)
if err != nil {
rw.WriteHeader(http.StatusInternalServerError)
+ return
}
rw.WriteHeader(code)
rw.Write(content)
bgstack15