Skip to content

Commit

Permalink
Set http breadcrumb level based on response code
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Aug 14, 2024
1 parent 72b6731 commit 1c1d68e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sentry/Laravel/Features/HttpClientIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ public function handleResponseReceivedHandlerForBreadcrumb(ResponseReceived $eve
{
$level = Breadcrumb::LEVEL_INFO;

if ($event->response->failed()) {
if ($event->response->clientError()) {
$level = Breadcrumb::LEVEL_WARNING;
} elseif ($event->response->serverError()) {
$level = Breadcrumb::LEVEL_ERROR;
}

Expand Down

0 comments on commit 1c1d68e

Please sign in to comment.