[Server] Connections endpoint masks provider HTTP statuses as 500
Description
GET /api/integrations/connections converts every provider failure into HTTP 500 instead of preserving the provider's HTTP status. This differs from neighboring handlers and prevents clients from distinguishing service unavailability, authorization/session failures, and other provider responses.
Current Behavior
When the provider returns an error carrying HTTP 503, GetConnections responds with HTTP 500 and replaces the provider error with ErrQueryGet.
Expected Behavior
The handler should use the provider-derived status, consistent with the other connection/environment handlers that call providerStatus(err).
Steps to Reproduce
- Invoke
GetConnectionswith a provider stub whoseGetConnectionsreturns an error tagged with HTTP 503. - Record the response.
- Observe status 500 rather than 503.
Evidence
$ go test ./server/handlers -run '^TestReproGetConnectionsPropagatesRemoteProviderStatus$' -count=1
status = 500, want provider status 503
FAILRoot Cause
GetConnections discards err when building the response and hard-codes http.StatusInternalServerError. Nearby handlers retain the provider error and use providerStatus(err).
Affected Components
- Meshery Server
- Connections REST API
- Remote/local provider error propagation
Validation
Executed on master commit 5b75615243e92b088b4ebf6e7bff82d6f60e5462:
go test ./server/handlers -run '^TestReproGetConnectionsPropagatesRemoteProviderStatus$' -count=1Result: deterministic failure; a tagged 503 is emitted as 500.
Acceptance Criteria
- Provider failures retain the appropriate HTTP status through
GetConnections. - The response preserves a useful wrapped cause rather than replacing it with a cause-free query error.
- Regression tests cover at least one non-500 provider status.
References
Source: meshery/meshery