Skip to content

Commit

Permalink
feat: add better error log in case we have a NoValidReceipts error (#…
Browse files Browse the repository at this point in the history
…134)

Signed-off-by: Gustavo Inacio <[email protected]>
  • Loading branch information
gusinacio authored Mar 14, 2024
1 parent f7308d1 commit c03c5b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tap-agent/src/tap/sender_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,16 @@ impl SenderAllocation {
// TODO: limit the number of receipts to aggregate per request.
None,
)
.await?;
.await
.map_err(|e| match e {
tap_core::Error::NoValidReceiptsForRAVRequest => anyhow!(
"It looks like there are no valid receipts for the RAV request.\
This may happen if your `rav_request_trigger_value` is too low \
and no receipts were found outside the `rav_request_timestamp_buffer_ms`.\
You can fix this by increasing the `rav_request_trigger_value`."
),
_ => e.into(),
})?;
if !invalid_receipts.is_empty() {
warn!(
"Found {} invalid receipts for allocation {} and sender {}.",
Expand Down

0 comments on commit c03c5b3

Please sign in to comment.