diff --git a/handlers/app/editor.go b/handlers/app/editor.go index 2473ca4..e41e69d 100644 --- a/handlers/app/editor.go +++ b/handlers/app/editor.go @@ -40,7 +40,13 @@ func EditorHandler(w http.ResponseWriter, r *http.Request) { if editorType == EDITOR_TYPE_EDIT { id := r.PathValue("id") - secret, _ = entries.FetchSecretFromID(identity.UserID, identity.MasterKey, id) + var fetchErr error + secret, fetchErr = entries.FetchSecretFromID(identity.UserID, identity.MasterKey, id) + + if fetchErr != nil { + http.Redirect(w, r, "/app", http.StatusFound) + return + } } }