Skip to content

Commit f0437ec

Browse files
author
Dion Low
committed
feat: add error boundary to install integration / polish
1 parent 0348d7d commit f0437ec

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/components/Configure/ErrorBoundary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class InstallIntegrationErrorBoundary extends Component<
3838
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {
3939
// Log error to console for debugging
4040
console.error("InstallIntegration Error Boundary caught an error:", error);
41-
console.error("Error Info:", errorInfo);
41+
console.error("[Error Info]:", errorInfo);
4242

4343
// Call optional error callback
4444
this.props.onError?.(error, errorInfo);

src/components/Configure/InstallIntegration.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ export function InstallIntegration({
166166
};
167167

168168
return (
169-
<InstallIntegrationErrorBoundary>
169+
// catch errors in the InstallIntegrationContent component
170+
<InstallIntegrationErrorBoundary
171+
fallback={
172+
<ComponentContainerError message="Something went wrong, couldn't find integration information" />
173+
}
174+
>
170175
{/* eventually will use the headless providers for integration, consumer, and group etc */}
171176
<InstallationProvider
172177
integration={integration}

0 commit comments

Comments
 (0)