moeru-ai/airi · error · ApiError
INTERNAL_SERVER_ERROR
INTERNAL_SERVER_ERROR
Error message
${providerLabel} tts fetch failed: ${errorMessageFrom(error) ?? 'unknown'} What it means
Catch-all in sendSpeechViaUnSpeech: the proxied TTS fetch through the UnSpeech upstream failed with an unexpected error that is neither an abort nor an UnSpeechAPIError (e.g. network failure, DNS error, connection reset). The error is rewrapped as an internal error with the provider label and extracted message so the router sees a single failure record; HTTP-level failures are handled separately as TtsUpstreamResponseError and aborts are rethrown untouched.
Source
Thrown at server/apps/api/src/services/adapters/tts/unspeech.ts:82
return {
contentType: result.contentType ?? fallbackContentType,
body: result.body,
}
}
catch (error) {
// Keep abort identity intact so the router can apply `onTimeout`
// independently from HTTP 500 fallback policy.
if (ctx.abortSignal?.aborted)
throw error
if (error instanceof UnSpeechAPIError) {
throw new TtsUpstreamResponseError(new Response(error.responseBody, {
status: error.status,
headers: error.responseHeaders,
}))
}
throw createInternalError(`${providerLabel} tts fetch failed: ${errorMessageFrom(error) ?? 'unknown'}`)
}
}
interface ListVoicesOptions {
ctx: TtsVoiceCatalogContext
query: string
providerLabel: string
}
/**
* Lists unspeech voices and maps SDK failures into AIRI gateway errors.
*
* Use when:
* - A TTS adapter needs unspeech's normalized `Voice[]` catalog.
*
* Expects:
* - `query` is an unspeech `/api/voices` query string such as
* `provider=microsoft®ion=eastasia`.View on GitHub (pinned to f679616c34)
Solutions
- Check upstream TTS provider connectivity, DNS, and TLS from the server
- Verify provider credentials and base URL configuration for the labeled provider
- Use errorMessageFrom(error) output in the message to identify the underlying network/library failure
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/apps/api/src/services/adapters/tts/unspeech.ts:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of moeru-ai/airi@f679616c34 (2026-09-08).
Data as JSON: /api/errors/224074f273281204.
Report an issue: GitHub.