We can see for example that Error: invalid argument #3 to 'format' (string expected, got nil)
has no stack trace, but there is another separated error CorePackages ... invalid argument #3 to ...
is recorded which clogging up the report.
It basically happened to all CorePackages related errors. We know the stack trace is malformed because when we copy it into forum, each line is only separated by a ‘space’, like so:
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:235: ------ Error caught by React ------ invalid argument #3 to 'format' (string expected, got nil) ------ Error caught by React ------ CorePackages.Workspace.Packages._Workspace.CapturesInExperience.CapturesInExperience.Utils.getCaptureStorageUsage:18 function formatBytes CorePackages.Workspace.Packages._Workspace.CapturesInExperience.CapturesInExperience.Utils.getCaptureStorageUsage:35 function getCaptureStorageUsage CorePackages.Workspace.Packages._Workspace.CapturesInExperience.CapturesInExperience.Components.CapturesGallery.GalleryActionContainer:82 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberHooks.new:1536 function mountMemo CorePackages.Packages._Index.React.React.ReactHooks:176 function useMemo CorePackages.Workspace.Packages._Workspace.CapturesInExperience.CapturesInExperience.Components.CapturesGallery.GalleryActionContainer:81 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberHooks.new:3124 function renderWithHooks CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:207 function renderWithHooks CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1575 function mountIndeterminateComponent CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3483 function beginWork CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:248 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1968 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1853 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1802 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:934 CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:961 CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:305 CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:261 CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:183 function doWork CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:219 function performWorkUntilDeadline
Expected behavior
Restore the correct format of the stack trace, so they appear correctly under the error, and not clogging up the error report