summaryrefslogtreecommitdiff
path: root/internal/handlers/widget.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/widget.go')
-rw-r--r--internal/handlers/widget.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/handlers/widget.go b/internal/handlers/widget.go
index 15ef3b2..b8c3aa9 100644
--- a/internal/handlers/widget.go
+++ b/internal/handlers/widget.go
@@ -473,6 +473,10 @@ func (h *Handler) HandleWidgetTaskUpdate(w http.ResponseWriter, r *http.Request)
return
}
if err := h.store.UpdateNativeTask(req.ID, req.Title, req.Description); err != nil {
+ if errors.Is(err, store.ErrNativeTaskNotFound) {
+ http.Error(w, "task not found", http.StatusNotFound)
+ return
+ }
http.Error(w, "failed to update task", http.StatusInternalServerError)
return
}