chore: Upgrade Sentry to latest and update debug messages (#9134)

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Márk Tolmács 2025-02-13 12:47:27 +01:00 committed by GitHub
parent 77dc055d81
commit f12b92ce9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 116 additions and 110 deletions

View file

@ -219,9 +219,8 @@ const restoreElementWithProperties = <
element.height > 1e6
) {
console.error(
`Restore element with properties size or position is too large ${JSON.stringify(
element,
)}`,
"Restore element with properties size or position is too large",
{ element },
);
}
@ -251,11 +250,7 @@ const restoreElement = (
element.height < -1e6 ||
element.height > 1e6
) {
console.error(
`Restore element size or position is too large ${JSON.stringify(
element,
)}`,
);
console.error("Restore element size or position is too large", { element });
}
switch (element.type) {

View file

@ -910,9 +910,11 @@ export const updateElbowArrowPoints = (
arrow.y + (arrow?.points?.[arrow?.points?.length - 1]?.[1] ?? 0) > MAX_POS
) {
console.error(
`Elbow arrow (or update) is outside reasonable bounds (> 1e6) arrow: ${JSON.stringify(
"Elbow arrow (or update) is outside reasonable bounds (> 1e6)",
{
arrow,
)} updates: ${JSON.stringify(updates)}`,
updates,
},
);
}
// @ts-ignore See above note
@ -2046,14 +2048,13 @@ const normalizeArrowElementUpdate = (
offsetY + points[points.length - 1][1] > MAX_POS
) {
console.error(
`Elbow arrow normalization is outside reasonable bounds (> 1e6) arrow: ${JSON.stringify(
{
x: offsetX,
y: offsetY,
points,
...getSizeFromPoints(points),
},
)}`,
"Elbow arrow normalization is outside reasonable bounds (> 1e6)",
{
x: offsetX,
y: offsetY,
points,
...getSizeFromPoints(points),
},
);
}

View file

@ -111,16 +111,14 @@ const _newElementBase = <T extends ExcalidrawElement>(
height < -1e6 ||
height > 1e6
) {
console.error(
`New element size or position is too large ${JSON.stringify({
x,
y,
width,
height,
// @ts-ignore
points: rest.points,
})}`,
);
console.error("New element size or position is too large", {
x,
y,
width,
height,
// @ts-ignore
points: rest.points,
});
}
// assign type to guard against excess properties

View file

@ -779,11 +779,13 @@ const getResizedOrigin = (
) > 1e6
) {
console.error(
`getResizedOrigin() new calculation creates extremely large (> 1e6) y value where the old calculation resulted in ${
y +
(newHeight - prevHeight) / 2 +
((prevWidth - newWidth) / 2) * Math.sin(angle)
}`,
"getResizedOrigin() new calculation creates extremely large (> 1e6) y value where the old calculation resulted in",
{
result:
y +
(newHeight - prevHeight) / 2 +
((prevWidth - newWidth) / 2) * Math.sin(angle),
},
);
}