Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate Errors from Router Task for Improved Reliability #41

Open
ametel01 opened this issue Feb 20, 2025 · 0 comments
Open

Propagate Errors from Router Task for Improved Reliability #41

ametel01 opened this issue Feb 20, 2025 · 0 comments

Comments

@ametel01
Copy link
Collaborator

if let Err(e) = router::initialize_router(db_clone, router_terminator).await {

Description:
The router task in the indexing service currently logs any error returned from router::initialize_router but then always returns Ok(()). This behavior can hide critical startup issues that may occur when initializing the router. Instead of silently proceeding, the task should propagate the error or handle it explicitly to ensure that any critical failures are properly addressed.

Steps to Reproduce:

  1. Simulate an error during router initialization by causing router::initialize_router to fail.
  2. Observe that the error is logged but the task still returns Ok(()), masking the failure.

Proposed Fix:
Modify the router task to propagate the error rather than returning Ok(()) after logging. For example:

let router_handle = tokio::spawn(async move {
    router::initialize_router(db_clone, router_terminator).await
});

Or, if additional cleanup or logging is needed, return the error accordingly.

Impact:
Propagating errors from the router task will help catch critical startup issues early and allow for a more robust error handling strategy in the indexing service.

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

No branches or pull requests

1 participant