-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Cryptic error when no audio input device is available #1114
Description
Description
When trying to record on a machine without an audio input device (e.g., Mac Studio with no external mic connected), the app shows a cryptic, unhelpful error message:
Failed to start recording: Failed to open recorder: Failed to fetch preferred config: A backend-specific error has occurred: An unknown error unknown to the coreaudio-rs API occurred
Expected Behavior
The app should show a clear, actionable error message telling the user that no microphone was found and suggesting they connect one.
Steps to Reproduce
- Use Handy on a machine without a built-in microphone (e.g., Mac Studio) with no external mic connected
- Trigger a recording
- Observe the cryptic error toast
Environment
- Handy v0.7.12
- macOS (Mac Studio, no built-in mic)
Root Cause
The error originates from cpal/coreaudio-rs when attempting to get the preferred audio config for a device that doesn't exist. The backend doesn't perform a pre-flight check for available input devices, and the error classification only distinguishes "microphone_permission_denied" vs "unknown" — there's no "no_input_device" category.