Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Fix: discovery wrong status on missing pool#179

Merged
JannikSt merged 2 commits into
developfrom
fix/discovery-wrong-status-on-missing-pool
Mar 27, 2025
Merged

Fix: discovery wrong status on missing pool#179
JannikSt merged 2 commits into
developfrom
fix/discovery-wrong-status-on-missing-pool

Conversation

@JannikSt
Copy link
Copy Markdown
Member

Discovery service sends 503 and panicks instead of sending a 404 when you request a pool id that does not exist.

@JannikSt JannikSt requested a review from Copilot March 27, 2025 17:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the discovery service incorrectly panics and returns a 503 error when a non-existent pool is queried by instead returning a 404 with an appropriate message.

  • Replaces a panic (unwrap) with proper error handling using a match expression.
  • Sends an HTTP 404 response when the pool is not found.

Comment thread discovery/src/api/routes/get_nodes.rs
@JannikSt JannikSt merged commit f2c2df7 into develop Mar 27, 2025
JannikSt added a commit that referenced this pull request Apr 12, 2025
* add proper 404 response when pool is not found
@JannikSt JannikSt deleted the fix/discovery-wrong-status-on-missing-pool branch June 25, 2025 13:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants