Skip to content

Replace all production unwrap()/expect() with proper error handling#93

Open
an0nn30 wants to merge 1 commit intomainfrom
fix/remove-production-unwraps
Open

Replace all production unwrap()/expect() with proper error handling#93
an0nn30 wants to merge 1 commit intomainfrom
fix/remove-production-unwraps

Conversation

@an0nn30
Copy link
Copy Markdown
Owner

@an0nn30 an0nn30 commented Mar 28, 2026

What does this PR do?

Eliminates all .unwrap() and .expect() calls in non-test production code across the workspace. Each is replaced with proper error propagation (?), ok_or_else, or graceful logging.

12 files changed:

  • conch_remote/ssh.rs — proxy stdin/stdout → RemoteError::Connection
  • conch_tauri/remote/server_commands.rs — dialog paths → ok_or_else
  • conch_vault/encryption.rs — byte slice conversion → VaultError::Corrupted
  • conch_plugin/lua/api/{mod,app,session,ui}.rswith_acc/with_host_api return LuaResult instead of panicking
  • conch_plugin/jvm/runtime.rs — JVM state → LoadError
  • conch_tauri/{ipc,platform,watcher}.rs — thread spawn/CString → graceful fallbacks

Type of change

  • Bug fix

Testing

  • Builds without errors
  • All workspace tests pass
  • No regressions

…uction code

Replace all .unwrap() and .expect() calls in non-test code with proper
error propagation using ok_or_else, map_err, if-let-err, and match
patterns. Changes span ssh proxy I/O, vault header parsing, Lua API
host bridge helpers, JVM plugin manager, IPC socket setup, locale
initialization, and theme watcher thread spawning.
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