tinyhumansai/openhuman · error
Core RPC returned an error
Error message
Core RPC returned an error
What it means
Thrown by parseQueueEnvelope() when the raw RPC response carries an `error` object but that error has no `message` string — this literal is the fallback. The core (or the RPC transport) reported a failure for provider_surfaces_list_queue, but the error details were lost or the error was an empty object, so the UI substitutes a generic message. The real cause lives in the core's logs.
Solutions
- Check the core logs around the request — the concrete failure reason is only visible there.
- Restart the core; a failed store init or transient lock often clears on a fresh boot.
- If the error envelope is from an older core, update core+app together to align the error shape.
- Improve the fallback to include envelope.error.code/stringified error so users see more than the generic text.
Example fix
// before
if (envelope.error) {
throw new Error(envelope.error.message ?? 'Core RPC returned an error');
}
// after — preserve whatever detail the envelope carried
if (envelope.error) {
const detail = envelope.error.message ?? envelope.error.code ?? JSON.stringify(envelope.error);
throw new Error(`provider_surfaces_list_queue failed: ${detail}`);
} Defensive patterns
Strategy: try-catch
Type guard
function hasErrorMessage(e: unknown): e is { error: { message: string } } {
return typeof (e as { error?: { message?: unknown } } | null)?.error?.message === 'string';
} Try / catch
try {
return await providerSurfacesApi.listQueue();
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);
if (msg === 'Core RPC returned an error') {
// detail was lost — check core logs; retry once after a core health check
await waitForCoreHealthy();
return await providerSurfacesApi.listQueue();
}
throw e;
} Prevention
- When wrapping envelopes, propagate error.code/description so the generic fallback rarely fires.
- Correlate with core logs using a request id when this surfaces in Sentry.
- Retry once after confirming core health — transient store init failures clear on restart.
When it happens
Trigger: The core handler returned a JSON-RPC error with a non-string or missing message field; the Tauri relay wrapped a core-side panic/timeout as {error:{}}; an envelope from an older core shape where error details ride a different key (code/description).
Common situations: Core crashed or timed out serving the queue list; version skew changing the error envelope shape; provider-surfaces store not initialized at boot so the handler errors early with a bare error.
Related errors
- provider_surfaces_list_queue: unexpected empty response
- Channel connect response missing status
- Core returned an empty backend URL
- Discord link complete response missing required boolean…
- Discord link start response missing required string field…
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/480dcc91bc95bab0.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/services/api/providerSurfacesApi.ts:18
import type { RespondQueueList } from '../../types/providerSurfaces';
import { callCoreRpc } from '../coreRpcClient';
interface ProviderSurfacesQueueEnvelope {
data?: RespondQueueList;
result?: { data?: RespondQueueList };
}
const EMPTY_QUEUE: RespondQueueList = { items: [], count: 0 };
function parseQueueEnvelope(raw: unknown): RespondQueueList {
if (!raw || typeof raw !== 'object') {
throw new Error('provider_surfaces_list_queue: unexpected empty response');
}
const envelope = raw as ProviderSurfacesQueueEnvelope & { error?: { message?: string } };
if (envelope.error) {
throw new Error(envelope.error.message ?? 'Core RPC returned an error');
}
const candidate = envelope.result?.data ?? envelope.data;
if (!candidate || !Array.isArray(candidate.items) || typeof candidate.count !== 'number') {
return EMPTY_QUEUE;
}
return candidate;
}
export const providerSurfacesApi = {
async listQueue(): Promise<RespondQueueList> {
const raw = await callCoreRpc<unknown>({ method: 'openhuman.provider_surfaces_list_queue' });
return parseQueueEnvelope(raw);
},
};
View on GitHub (pinned to 7491200858)