Mintplex-Labs/anything-llm · error · Error
Deepgram transcription failed - ${error.message}
Error message
Deepgram transcription failed - ${error.message} What it means
The outer .catch wrapper around the entire Deepgram transcribe promise chain. It logs the failure and re-throws a generic 'Deepgram transcription failed - <message>' error. Because the inner !response.ok branch (error 367) throws and then this catch re-wraps it, a failed HTTP request surfaces here as a nested message. It also catches network/JSON-parse errors that never produced a response.
Source
Thrown at server/utils/SpeechToText/deepgram/index.js:74
body: audioBuffer,
})
.then(async (response) => {
if (!response.ok) {
const errBody = await response.text().catch(() => "");
throw new Error(
`Deepgram transcription failed (${response.status}) - ${errBody}`
);
}
return response.json();
})
.then((result) => {
return (
result?.results?.channels?.[0]?.alternatives?.[0]?.transcript ?? ""
);
})
.catch((error) => {
this.#log(`Deepgram transcription failed - ${error.message}`);
throw new Error(`Deepgram transcription failed - ${error.message}`);
});
}
}
module.exports = { DeepgramSTT };
View on GitHub (pinned to 526360e320)
Solutions
- If the inner message contains an HTTP status, follow the fix for error 367.
- If the message is a network error (fetch failed / ECONNREFUSED / ENOTFOUND), check container egress, DNS, and proxy settings.
- Add retry with exponential backoff for transient failures before surfacing to the user.
- Verify outbound connectivity: curl -I https://api.deepgram.com from the host/container.
Defensive patterns
Strategy: try-catch
Validate before calling
// Network reachability check before transcription.
const ok = await fetch("https://api.deepgram.com", { method: "HEAD" })
.then(() => true)
.catch(() => false);
if (!ok) throw new Error("Cannot reach api.deepgram.com from this host."); Try / catch
try {
return await deepgram.transcribe(audioBuffer, filename);
} catch (e) {
logger.error("Deepgram STT failed:", e.message);
// optionally fall back to another STT provider here
throw e;
} Prevention
- Ensure container egress to api.deepgram.com is allowed (firewall/proxy).
- Wrap transcription in retry for transient network errors.
- Distinguish status-code errors (367) from network errors to choose retry vs. fix.
When it happens
Trigger: Any unhandled rejection inside transcribe: a network/DNS failure reaching api.deepgram.com, a malformed JSON response, or the re-thrown HTTP error from the inner check. The caller sees this flattened message.
Common situations: Container has no outbound internet; corporate proxy/firewall blocking api.deepgram.com; transient network blip; response.ok was true but body was not JSON.
Related errors
- Deepgram transcription failed (${response.status}) - ${errBo
- Your Ollama instance could not be reached or is not respondi
- No Deepgram API key was set.
- API Call failed: ${error.message}
- Failed to sync link content. ${reason}
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/0526f0b110a9932d.
Report an issue: GitHub.