Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
ErrorBoundary.tsx1.39 kB
import { Component, ReactNode } from "react"; import { BugReportErrorBoundaryFallback } from "./BugReportErrorBoundaryFallback"; import { ErrorBoundaryFallbackComponent } from "./types"; type ErrorBoundaryProps = { children: ReactNode; /** * The fallback component that gets displayed when the error occurs. * @default BugReportErrorBoundaryFallback */ fallback?: ErrorBoundaryFallbackComponent; }; export class ErrorBoundary extends Component< ErrorBoundaryProps, { hasError: boolean; error: unknown } > { constructor(props: ErrorBoundaryProps) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error: unknown) { // Update state so the next render will show the fallback UI. return { hasError: true, error }; } componentDidCatch(_error: unknown, _errorInfo: unknown) { // You can also log the error to an error reporting service // logErrorToMyService(error, errorInfo); } render() { if (this.state.hasError) { const errorMessage: string | null = this.state.error instanceof Error ? this.state.error.message : null; return typeof this.props.fallback === "function" ? ( <this.props.fallback error={errorMessage} /> ) : ( <BugReportErrorBoundaryFallback error={errorMessage} /> ); } return this.props.children; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server