RHINENG-25551 fix(cost-management): surface SSO auth errors instead of silent failures - #2826
Conversation
Code Review by Qodo
1.
|
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
Review Summary by QodoSurface SSO authentication errors with descriptive messages
WalkthroughsDescription• Extract SSO error details from response body instead of generic HTTP status text • Return 502 with credential-specific message when SSO authentication fails • Read error field from JSON response bodies in client classes for actionable frontend messages Diagramflowchart LR
A["SSO Auth Failure"] -->|"Extract error_description/error"| B["tokenUtil"]
B -->|"Throw descriptive error"| C["secureProxy"]
C -->|"Return 502 with credential message"| D["Frontend"]
E["API Response"] -->|"Read error field"| F["OptimizationsClient<br/>CostManagementSlimClient"]
F -->|"Throw error message"| D
File Changes1. workspaces/cost-management/plugins/cost-management-backend/src/routes/secureProxy.ts
|
…f silent failures When the plugin is configured with invalid hybrid cloud service account credentials, the UI previously showed a generic "Bad Gateway" or empty table instead of an actionable error message. - tokenUtil: extract SSO error details (error_description/error) from the response body instead of throwing bare HTTP status text - secureProxy: return 502 with credential-specific message when SSO authentication fails, distinguishing it from other proxy errors - OptimizationsClient & CostManagementSlimClient: read the error field from JSON response bodies on non-OK responses so the frontend displays the backend's descriptive message Made-with: Cursor
…SO auth failures Replace brittle string-prefix matching with SsoAuthenticationError class so secureProxy detects auth failures via instanceof instead of message.startsWith(), making the contract compile-time enforced. Made-with: Cursor
25f5733 to
4b6549c
Compare
|



Description
RHINENG-25551 FLPATH-3237
fix(cost-management): surface SSO auth errors instead of silent failures
When the plugin is configured with invalid hybrid cloud service account credentials, the UI previously showed a generic "Bad Gateway" or empty table instead of an actionable error message.
Made-with: Cursor
Screenshots
Hey, I just made a Pull Request!
✔️ Checklist