Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: fix sentry issues in alerts and infra monitoring (#8566)

Amlan Kumar Nandydb0f3624827d
diff --git a/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx b/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx
index 1dd152a87a..fc4134f17a 100644
--- a/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx
+++ b/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx
@@ -48,8 +48,8 @@ function ChannelSelect({
if (hasError) {
notifications.error({
- message: error.getErrorCode(),
- description: error.getErrorMessage(),
+ message: error?.getErrorCode?.() || 'Error',
+ description: error?.getErrorMessage?.() || 'Something went wrong',
});
}
diff --git a/frontend/src/container/InfraMonitoringK8s/commonUtils.tsx b/frontend/src/container/InfraMonitoringK8s/commonUtils.tsx
index e61f64e5db..06e051ed66 100644
--- a/frontend/src/container/InfraMonitoringK8s/commonUtils.tsx
+++ b/frontend/src/container/InfraMonitoringK8s/commonUtils.tsx
@@ -285,9 +285,13 @@ export const getFiltersFromParams = (
): IBuilderQuery['filters'] | null => {
const filtersFromParams = searchParams.get(queryKey);
if (filtersFromParams) {
- const decoded = decodeURIComponent(filtersFromParams);
- const parsed = JSON.parse(decoded);
- return parsed as IBuilderQuery['filters'];
+ try {
+ const decoded = decodeURIComponent(filtersFromParams);
+ const parsed = JSON.parse(decoded);
+ return parsed as IBuilderQuery['filters'];
+ } catch (error) {
+ return null;
+ }
}
return null;
};