Skip to content

Fix: Harden startup and API error propagation - #1

Open
mertcano wants to merge 1 commit into
podnetwork:mainfrom
mertcano:mertcano-patch-1
Open

mertcano wants to merge 1 commit into
podnetwork:mainfrom
mertcano:mertcano-patch-1

Conversation

@mertcano

Copy link
Copy Markdown

Description

This PR addresses unreliable initialization and runtime behavior in the alerter service[cite: 41]. Previously, the service relied on unsafe unwrap paths that could cause panics or allow the process to continue running in a falsely healthy state after a failure[cite: 41].

Key Changes

  • Startup & Error Propagation (crates/alerter/src/lib.rs, crates/alerter/src/main.rs): Replaced production unwrap calls with proper typed error propagation using anyhow::Result and the ? operator[cite: 41, 49, 50]. The executable now reliably returns initialization or runtime failures back to the operating system, terminating safely rather than continuing as a falsely healthy process[cite: 41, 50].

### Description
This PR addresses unreliable initialization and runtime behavior in the alerter service[cite: 41]. Previously, the service relied on unsafe `unwrap` paths that could cause panics or allow the process to continue running in a falsely healthy state after a failure[cite: 41]. 

### Key Changes
* **Startup & Error Propagation (`crates/alerter/src/lib.rs`, `crates/alerter/src/main.rs`):** Replaced production `unwrap` calls with proper typed error propagation using `anyhow::Result` and the `?` operator[cite: 41, 49, 50]. The executable now reliably returns initialization or runtime failures back to the operating system, terminating safely rather than continuing as a falsely healthy process[cite: 41, 50].
@mertcano

Copy link
Copy Markdown
Author

Hi! It looks like the cla check is failing before I can sign it due to a workflow permission issue (Resource not accessible by integration). The contributor-assistant/github-action likely needs contents: write and pull-requests: write permissions in the workflow file, or it's hitting a branch protection rule. Could you take a look?

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