The platform for continuously improving AI agents.
import { ConnectError } from "@connectrpc/connect";
export function errorMessage(error: unknown): string {
if (error instanceof ConnectError) return error.message;
if (error instanceof Error) {
if (error.message === "Failed to fetch") {
return "Could not reach the collector. Start it on port 4318, or set VITE_OTEL_URL.";
}
return error.message;
}
return "Request failed";
}