From 3b0f7c475c84ce1612cbaef4eca822cd989d84da Mon Sep 17 00:00:00 2001 From: Levin Herr Date: Fri, 22 Sep 2023 23:36:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20catch=20null=20exception=20in=20?= =?UTF-8?q?prometheus=20exporter=20(#1923)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Providers/PrometheusServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/PrometheusServiceProvider.php b/app/Providers/PrometheusServiceProvider.php index 2cb9f1d66..b18d590af 100644 --- a/app/Providers/PrometheusServiceProvider.php +++ b/app/Providers/PrometheusServiceProvider.php @@ -39,7 +39,7 @@ public function register() { ->selectRaw("count(*) AS total, operator_id, category") ->with("operator") ->get() - ->map(fn($item) => [$item->total, [$item->operator->name, $item->category]]) + ->map(fn($item) => [$item->total, [$item->operator?->name, $item->category]]) ->toArray(); });