mantinedev/mantine · error · Error
Failed to fetch ${url}: ${response.status}
Error message
Failed to fetch ${url}: ${response.status} What it means
The @mantine/mcp-server data client fetches JSON from a configured base URL with a timeout. When the HTTP response is not ok, it throws an error including the URL and status code. This is infrastructure-level: the MCP data server (Mantine docs data) is unreachable or erroring.
Source
Thrown at packages/@mantine/mcp-server/src/data-client.ts:35
private readonly timeoutMs: number;
private indexCache: IndexItem[] | null = null;
private itemCache = new Map<string, ItemData>();
constructor(baseUrl = 'https://mantine.dev/mcp', timeoutMs = 10000) {
this.baseUrl = baseUrl.replace(/\/+$/, '');
this.timeoutMs = timeoutMs;
}
private async fetchJson<T>(relativePath: string): Promise<T> {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
try {
const url = `${this.baseUrl}/${relativePath.replace(/^\/+/, '')}`;
const response = await fetch(url, { signal: controller.signal });
if (!response.ok) {
throw new Error(`Failed to fetch ${url}: ${response.status}`);
}
return (await response.json()) as T;
} finally {
clearTimeout(timer);
}
}
async getIndex() {
if (this.indexCache) {
return this.indexCache;
}
this.indexCache = await this.fetchJson<IndexItem[]>('index.json');
return this.indexCache;
}
async listItems(args: ListItemsArgs = {}) {View on GitHub (pinned to 8a284e2c2c)
Solutions
- Verify the base URL configuration points to a reachable host
- Test connectivity directly: curl the URL from the same environment
- Configure proxy/CA settings so Node's fetch can traverse the corporate network
- Retry after transient failures or run the data source locally
Example fix
// before
new DataClient({ baseUrl: 'https://data.mantine.dev' }); // 500/404 from host
// after
// verify with curl, then point at a healthy mirror
new DataClient({ baseUrl: 'https://your-mirror.example.com' }); Defensive patterns
Strategy: retry
Validate before calling
// Smoke-check reachability before starting the server
await fetch(`${baseUrl}/index.json`, { method: 'HEAD' }).catch(() => {
console.error('MCP data host unreachable — check network/proxy');
}); Try / catch
try {
const index = await client.getIndex();
} catch (e) {
if (e instanceof Error && e.message.startsWith('Failed to fetch')) {
// retry with backoff or switch baseUrl
}
} Prevention
- Pin the data host in config and monitor it
- Configure proxy env vars (HTTPS_PROXY) in corporate networks
- Add retries with exponential backoff around fetchJson calls
When it happens
Trigger: The MCP server cannot reach its data host (network blocked, proxy interference); base URL misconfigured; data endpoint returns 404/500; DNS or corporate firewall blocking the request.
Common situations: Running the MCP server behind a corporate proxy that strips requests; stale base URL after a data source migration; the remote data service being temporarily down; local offline development.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
AI-assisted analysis of mantinedev/mantine@8a284e2c2c (2026-08-28).
Data as JSON: /api/errors/b2f08876730984df.
Report an issue: GitHub.