diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-10-23 09:58:09 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-23 09:59:39 +0200 |
| commit | 632b86c938a94237bde5ec0b45df7258bf95ba8f (patch) | |
| tree | 6320b0db07f82cf29bf6e67e382bd17ba8f4f561 /dashboard/dashapi/dashapi.go | |
| parent | 8fa0c867d4e4bbd97321b19ac11115fa7020570a (diff) | |
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.
Diffstat (limited to 'dashboard/dashapi/dashapi.go')
| -rw-r--r-- | dashboard/dashapi/dashapi.go | 8 |
1 files changed, 6 insertions, 2 deletions
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 { |
