Skip to content

fix(groq): surface non-APIError fetch failures as WhisperingError#1377

Open
aspiers wants to merge 1 commit intoEpicenterHQ:mainfrom
aspiers:fix/groq-non-api-error-handling
Open

fix(groq): surface non-APIError fetch failures as WhisperingError#1377
aspiers wants to merge 1 commit intoEpicenterHQ:mainfrom
aspiers:fix/groq-non-api-error-handling

Conversation

@aspiers
Copy link
Copy Markdown

@aspiers aspiers commented Feb 18, 2026

Summary

When a Groq transcription request fails with a non-APIError (e.g. a network error or tauriFetch failure), the previous code re-threw the error as an unhandled exception rather than returning a user-facing error.

This fix catches non-APIError exceptions and wraps them in a WhisperingErr with a descriptive title and message, consistent with how other errors are handled in this service.

Previously, if the Groq SDK's fetch call threw anything other than a
Groq.APIError (e.g. a network error or IPC failure from tauriFetch),
the catch handler would re-throw it. This escaped the tryAsync wrapper
and caused an unhandled promise rejection, silently killing the
transcription pipeline with no user-visible error.

Now all non-APIError throws are caught and returned as a WhisperingErr
with the error message extracted, so they surface as toast notifications
like any other transcription failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant