diff --git a/src/IncomingEntry.php b/src/IncomingEntry.php index 43bf38233..05bd974b5 100644 --- a/src/IncomingEntry.php +++ b/src/IncomingEntry.php @@ -167,6 +167,17 @@ public function hasMonitoredTag() return false; } + /** + * Determine if the incoming entry is a failed request. + * + * @return bool + */ + public function isFailedRequest() + { + return $this->type === EntryType::REQUEST && + ($this->content['response_status'] ?? 200) >= 500; + } + /** * Determine if the incoming entry is a failed job. * diff --git a/stubs/TelescopeServiceProvider.stub b/stubs/TelescopeServiceProvider.stub index 6d66c38d3..b75abbb38 100644 --- a/stubs/TelescopeServiceProvider.stub +++ b/stubs/TelescopeServiceProvider.stub @@ -26,6 +26,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider } return $entry->isReportableException() || + $entry->isFailedRequest() || $entry->isFailedJob() || $entry->isScheduledTask() || $entry->hasMonitoredTag();