Skip to content

Refactor spawn_blocking error propagation - #421

Merged
Cylae merged 1 commit into
mainfrom
refactor-spawn-blocking-2157307521563393444
Sep 13, 2026
Merged

Cylae merged 1 commit into
mainfrom
refactor-spawn-blocking-2157307521563393444

Conversation

@Cylae

@Cylae Cylae commented Sep 13, 2026

Copy link
Copy Markdown
Owner
  • Removed redundant .context("Failed to join blocking task") wrappers in load_async and update_service_async within config.rs and users.rs, favoring idiomatic .await? for exact JoinError propagation.
  • Replaced silent .unwrap_or(false) and .unwrap_or(tuple) with .unwrap_or_else in users.rs password verification and web.rs telemetry to explicitly log JoinErrors.
  • Refactored six axum handlers in web.rs (add_user, update_user_role_and_quota, delete_user, install_user_app, uninstall_user_app, update_password) to replace verbose error swallowing match blocks with .unwrap_or_else capturing the JoinError contextually into the anyhow chain, preventing silent loss of source failures.
  • Zero behavior changes outside error preservation.

- Removed redundant `.context("Failed to join blocking task")` wrappers in `load_async` and `update_service_async` within `config.rs` and `users.rs`, favoring idiomatic `.await?` for exact `JoinError` propagation.
- Replaced silent `.unwrap_or(false)` and `.unwrap_or(tuple)` with `.unwrap_or_else` in `users.rs` password verification and `web.rs` telemetry to explicitly log `JoinError`s.
- Refactored six axum handlers in `web.rs` (`add_user`, `update_user_role_and_quota`, `delete_user`, `install_user_app`, `uninstall_user_app`, `update_password`) to replace verbose error swallowing `match` blocks with `.unwrap_or_else` capturing the `JoinError` contextually into the `anyhow` chain, preventing silent loss of source failures.
- Zero behavior changes outside error preservation.
@Cylae
Cylae merged commit f20e925 into main Sep 13, 2026
1 check passed
@Cylae
Cylae deleted the refactor-spawn-blocking-2157307521563393444 branch September 13, 2026 23:35
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