Skip to content

Commit

Permalink
Set http breadcrumb level based on response code (#940)
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric authored Sep 4, 2024
1 parent 78e8448 commit 14e828d
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 @@ -117,7 +117,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 14e828d

Please # to comment.