From 632b86c938a94237bde5ec0b45df7258bf95ba8f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 23 Oct 2017 09:58:09 +0200 Subject: dashboard/app: better errors from bug update command Provide better errors from bug update command. In particular, distinguish between bad updates and internal errors. Also better messages. Allow duping onto closed bugs. Don't allow unduping from closed bugs. --- dashboard/dashapi/dashapi.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dashboard/dashapi/dashapi.go') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index d59b2a836..ef51f4f51 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -170,8 +170,12 @@ type BugUpdate struct { } type BugUpdateReply struct { - OK bool - Text string + // Bug update can fail for 2 reason: + // - update does not pass logical validataion, in this case OK=false + // - internal/datastore error, in this case Error=true + OK bool + Error bool + Text string } type PollRequest struct { -- cgit mrf-deployment