Skip to content

Commit

Permalink
🐛 catch null exception in prometheus exporter (#1923)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrLevin authored Sep 22, 2023
1 parent 1bd9881 commit 3b0f7c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Providers/PrometheusServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down

0 comments on commit 3b0f7c4

Please sign in to comment.