fix(ErrorBoundary): Allow for details to be shown in production. (#5504)

Added showErrorDetails to config to allow for details to be shown in various runtime environments.
This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2025-10-17 08:15:13 -04:00
1 parent cf8f4aa120
commit 4620cc3acf
4 files changed
+33 -9

No files matched your search

+1
View File
@@ -25,6 +25,7 @@ window.config = {
// above, the number of requests can be go a lot higher.
prefetch: 25,
},
showErrorDetails: 'always', // 'always', 'dev', 'production'
// filterQueryParam: false,
// Defines multi-monitor layouts
multimonitor: [
+7 -1
View File
@@ -128,11 +128,17 @@ const createRoutes = ({
];
function RouteWithErrorBoundary({ route, ...rest }) {
const [appConfig] = useAppConfig();
const { showErrorDetails } = appConfig;
history.navigate = useNavigate();
// eslint-disable-next-line react/jsx-props-no-spreading
return (
<ErrorBoundary context={`Route ${route.path}`}>
<ErrorBoundary
context={`Route ${route.path}`}
showErrorDetails={showErrorDetails}
>
<route.children
{...rest}
{...route.props}