Skip to content

Commit 483ef3b

Browse files
authored
chore: Update error message when fail to send log (#790)
## Problem When logs fail to be sent to Datadog, the extension prints an error: > No more retries as the access was rejected which I think can be more clear. <img width="709" height="305" alt="Pasted Graphic" src="https://github.com/user-attachments/assets/6eae0497-8b24-48d0-a192-5215c6e1560f" /> ## This PR Change the error message to: > Failed to send logs to datadog because access was rejected. Is the API key invalid?
1 parent 41695c4 commit 483ef3b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bottlecap/src/logs/flusher.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ impl Flusher {
128128
let status = resp.status();
129129
_ = resp.text().await;
130130
if status == StatusCode::FORBIDDEN {
131-
error!("No more retries as the access was rejected");
131+
// Access denied. Stop retrying.
132+
error!(
133+
"Failed to send logs to Datadog: Access denied. Please verify that your API key is valid."
134+
);
132135
return Ok(());
133136
}
134137
if status == 202 {

0 commit comments

Comments
 (0)