@khanacademy/perseus 17.3.1 → 17.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -17421,10 +17421,18 @@ class ErrorBoundary extends React__namespace.Component {
17421
17421
  error: error.toString()
17422
17422
  });
17423
17423
  this.props.onError?.(error, info);
17424
- Log.error("Perseus error boundary caught error", Errors.Internal, {
17424
+ Log.error(
17425
+ // NOTE(jeremy): We concatenate the error messsage here. Typical
17426
+ // Khan Academy error handling guidance says that you should never
17427
+ // "build" the error message that might be sent to our error
17428
+ // reporting tool (currently Sentry). However, if we don't
17429
+ // differentiate between the different errors that are thrown, they
17430
+ // all end up being grouped as a single Sentry event, which is very
17431
+ // unhelpful.
17432
+ "Unhandled Perseus error: " + error.message, Errors.Internal, {
17425
17433
  cause: error,
17426
17434
  loggedMetadata: {
17427
- componentStack: info.componentStack,
17435
+ componentStack: !!info && "componentStack" in info ? info.componentStack : "componentStack not provided",
17428
17436
  ...this.props.metadata
17429
17437
  }
17430
17438
  });
@@ -17439,8 +17447,9 @@ class ErrorBoundary extends React__namespace.Component {
17439
17447
  return /*#__PURE__*/React__namespace.createElement("svg", {
17440
17448
  height: "16",
17441
17449
  width: "16",
17442
- viewBox: "0 0 16 16"
17443
- }, /*#__PURE__*/React__namespace.createElement("path", {
17450
+ viewBox: "0 0 16 16",
17451
+ role: "img"
17452
+ }, /*#__PURE__*/React__namespace.createElement("title", null, "Rendering Error!"), /*#__PURE__*/React__namespace.createElement("path", {
17444
17453
  d: "m8 16c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-3c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0-9c-0.55 0-1 0.45-1 1v4c0 0.55.45 1 1 1s1-0.45 1-1v-4c0-0.55-0.45-1-1-1z",
17445
17454
  fill: "#d92916",
17446
17455
  fillRule: "evenodd"
@@ -44328,7 +44337,7 @@ const init = function (options) {
44328
44337
 
44329
44338
  // This file is processed by a Rollup plugin (replace) to inject the production
44330
44339
  const libName = "@khanacademy/perseus";
44331
- const libVersion = "17.3.1";
44340
+ const libVersion = "17.3.2";
44332
44341
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
44333
44342
 
44334
44343
  const apiVersion = {