Handle exception where prepared statements viewer does not get a value (#5531)
This commit is contained in:
parent
3391ead510
commit
75c439f66d
|
|
@ -15,6 +15,8 @@ import {
|
|||
EvaluationError,
|
||||
PropertyEvaluationErrorType,
|
||||
} from "utils/DynamicBindingUtils";
|
||||
import * as Sentry from "@sentry/react";
|
||||
import { Severity } from "@sentry/react";
|
||||
|
||||
const Wrapper = styled.div`
|
||||
position: relative;
|
||||
|
|
@ -155,6 +157,13 @@ export function PreparedStatementViewer(props: {
|
|||
evaluatedValue: PreparedStatementValue;
|
||||
}) {
|
||||
const { parameters, value } = props.evaluatedValue;
|
||||
if (!value) {
|
||||
Sentry.captureException("Prepared Statement got no value", {
|
||||
level: Severity.Debug,
|
||||
extra: { props },
|
||||
});
|
||||
return <div />;
|
||||
}
|
||||
const stringSegments = value.split(/\$\d/);
|
||||
const $params = [...value.matchAll(/\$\d/g)].map((matches) => matches[0]);
|
||||
const paramsWithTooltips = $params.map((param) => (
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user