Skip to content
This repository was archived by the owner on Mar 30, 2020. It is now read-only.

Commit b152c5f

Browse files
committed
http: better error handling
1 parent 7bb1d90 commit b152c5f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

http/handle_status.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ func (s *server) HandleStatus(msg Message, session sockjs.Session) {
2828
}
2929

3030
record := &StatusResult{Project: p}
31-
sl, err := p.Status()
32-
if len(err) != 0 {
33-
record.Error = err
31+
sl, errs := p.Status()
32+
if len(errs) != 0 {
33+
for _, err := range errs {
34+
core.Error(err.Error(), "project", p)
35+
}
36+
37+
record.Error = errs
3438
} else {
3539
record.Status = make(map[string]*StatusRecord, 0)
3640
for _, s := range sl {

0 commit comments

Comments
 (0)