Skip to content

Commit

Permalink
Do not print error when reading tasks from an empty dlq using tdbg
Browse files Browse the repository at this point in the history
  • Loading branch information
prathyushpv committed Jan 9, 2025
1 parent 8ee9943 commit 89828cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/tdbg/dlq_v2_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ func (ac *DLQV2Service) ReadMessages(c *cli.Context) (err error) {
}
res, err := adminClient.GetDLQTasks(ctx, request)
if err != nil {
// If the DLQ does not exist yet, it's effectively empty, so we can safely return without an error.
if strings.Contains(err.Error(), "queue not found:") {
return nil, nil, nil
}
return nil, nil, fmt.Errorf("call to GetDLQTasks from ReadMessages failed: %w", err)
}
return res.DlqTasks, res.NextPageToken, nil
Expand Down

0 comments on commit 89828cc

Please sign in to comment.