Skip to content

Commit

Permalink
Merge pull request #14 from petterw/master
Browse files Browse the repository at this point in the history
Log err on failure to set
  • Loading branch information
jhaals authored Dec 19, 2017
2 parents 3def966 + 508ae87 commit 1a39dfc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions yopass.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func saveHandler(response http.ResponseWriter, request *http.Request,
uuid := uuid.NewV4()
err = db.Set(uuid.String(), secret.Message, secret.Expiration)
if err != nil {
log.Println(err)
http.Error(response, `{"message": "Failed to store secret in database"}`, http.StatusInternalServerError)
return
}
Expand Down

0 comments on commit 1a39dfc

Please sign in to comment.