-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 webserver: Fix 5XX error in GET /v0/projects/{project_id}/nodes/-/services when project has no nodes
#8501
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
🐛 webserver: Fix 5XX error in GET /v0/projects/{project_id}/nodes/-/services when project has no nodes
#8501
Conversation
GET /v0/projects/{project_id}/nodes/-/services when project has no nodes
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8501 +/- ##
==========================================
+ Coverage 87.62% 89.60% +1.97%
==========================================
Files 2001 1576 -425
Lines 77920 65050 -12870
Branches 1338 496 -842
==========================================
- Hits 68280 58287 -9993
+ Misses 9240 6634 -2606
+ Partials 400 129 -271
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
🧪 CI InsightsHere's what we observed from your CI run for dfc45a0. 🟢 All jobs passed!But CI Insights is watching 👀 |
…spov/osparc-simcore into fix/catalog-batch-service-follow-up
|
@mergify queue |
🟠 Waiting for conditions to match
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some thoughts here.
services/catalog/src/simcore_service_catalog/service/catalog_services.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Show resolved
Hide resolved
|



What do these changes do?
The endpoint
GET /v0/projects/{project_id}/nodes/-/serviceswas returning a 5XX error due to an unhandledpydantic.ValidationErrorraised bycatalog_service.batch_get_my_services. SEEThis occurred when a project had no nodes — resulting in an empty list being passed to the batch operation, which expects at least one service identifier.
The fix ensures that the request short-circuits gracefully when there are no nodes, avoiding the call to
batch_get_my_servicesand returning an empty response instead.Related issue/s
How to test
Manually
Driving test
Dev-ops
None