Skip to content

Commit

Permalink
bug: issue with no writer callbacks registered
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Simpson committed Dec 12, 2024
1 parent 51231e6 commit 1ecb381
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/srv/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func (b *busService) ResetWriterBus(ctx context.Context, request *pb.BusTarget)
return nil, err
}

if len(b.writerCallbacks) == 0 {
return nil, status.Errorf(codes.NotFound, "no writer buses registered")
}

if request.GetType() == "" {
var err error
builder := strings.Builder{}
Expand Down

0 comments on commit 1ecb381

Please sign in to comment.