Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add case for error http status (#8)
This should prevent a raised error like such: ``` (CaseClauseError no case clause matching: {:ok, %Finch.Response{body: "", headers: [{"datadog-agent-state", "3e08d91eabb10dd5b61fe89c78d84597c33b237eea8bed02ca3e8193ff1beac8"}, {"datadog-agent-version", "7.41.1"}], status: 502}}) ``` Instead, it will catch the error and run `Logger.error("Error sending metrics to Datadog", error: error)`. While still noisy in logs, it should not show up in error reporters like Sentry or DataDog.
- Loading branch information