You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: improve credential graph error handling and resolution logic (#602)
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
- Refined error messages for better clarity when credential resolution
fails.
- Introduced `ErrNoIndirectCredentials` for clear distinction between
direct and indirect resolution failures.
- Enhanced `ToGraph` to handle `nil` configurations and added fallback
logic for indirect resolution.
- Updated method signatures to support the new `GraphResolver`
interface.
- Adjusted indirect resolution logic to signal failure without excessive
verbosity.
- Incorporated tests to validate updated error handling and resolution
workflows.
#### Which issue(s) this PR fixes
Improves the readability and maintainability of credential graph
resolution errors and ensures consistency across direct and indirect
resolution paths. (noticed during testing of CLI interaction with
credential graph)
---------
Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
r.ErrorContains(err, fmt.Sprintf("failed to resolve credentials for identity %q: failed to match any node: no direct credentials found in graph", id.String()))
0 commit comments