@@ -56,11 +56,11 @@ func headerRenderer(ctx context.Context, c zbus.Client, h *widgets.Paragraph, r
5656 }
5757
5858 go func () {
59- registrarLable := "registrar"
59+ registrarLabel := "registrar"
6060 zui := stubs .NewZUIStub (c )
6161
6262 // empty out zui errors for registrar
63- if zuiErr := zui .PushErrors (ctx , registrarLable , []string {}); zuiErr != nil {
63+ if zuiErr := zui .PushErrors (ctx , registrarLabel , []string {}); zuiErr != nil {
6464 log .Info ().Err (zuiErr ).Send ()
6565 }
6666
@@ -80,12 +80,16 @@ func headerRenderer(ctx context.Context, c zbus.Client, h *widgets.Paragraph, r
8080 nodeID = green (err .Error ())
8181 } else {
8282 nodeID = red (fmt .Sprintf ("%d (unregistered)" , node ))
83- if zuiErr := zui .PushErrors (ctx , registrarLable , []string {err .Error ()}); zuiErr != nil {
83+ if zuiErr := zui .PushErrors (ctx , registrarLabel , []string {err .Error ()}); zuiErr != nil {
8484 log .Info ().Err (zuiErr ).Send ()
8585 }
8686 }
8787 } else {
8888 nodeID = green (fmt .Sprint (node ))
89+ // Clear registrar errors when registration succeeds
90+ if zuiErr := zui .PushErrors (ctx , registrarLabel , []string {}); zuiErr != nil {
91+ log .Info ().Err (zuiErr ).Send ()
92+ }
8993 }
9094
9195 cache := green ("OK" )
0 commit comments