Skip to content

chore: remove typed error again because we can use ErrNoIndirectCredentials directly#1970

Merged
jakobmoellerdev merged 1 commit into
open-component-model:mainfrom
frewilhelm:rm-cred-typed-error
Mar 13, 2026
Merged

chore: remove typed error again because we can use ErrNoIndirectCredentials directly#1970
jakobmoellerdev merged 1 commit into
open-component-model:mainfrom
frewilhelm:rm-cred-typed-error

Conversation

@frewilhelm

@frewilhelm frewilhelm commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

#1967 introduced a typed error ErrNoRepositoryPluginFound. However, functionality wise we do not use that error later on. Thus, we can just use the typed error ErrNoIndirectCredentials for now instead.

Summary by CodeRabbit

Release Notes

  • Refactor
    • Improved error handling consistency in the credential resolution process through streamlined error detection logic.

…directly

Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2be9fd9b-796a-4f16-88f9-3d0699d2b2f8

📥 Commits

Reviewing files that changed from the base of the PR and between d7286c5 and e6aff38.

📒 Files selected for processing (2)
  • bindings/go/credentials/plugins.go
  • bindings/go/credentials/resolve_indirect.go
💤 Files with no reviewable changes (1)
  • bindings/go/credentials/plugins.go

📝 Walkthrough

Walkthrough

This PR removes the exported ErrNoRepositoryPluginFound error constant from the credentials package and simplifies error handling in the repository resolution logic to treat all repository plugin errors uniformly instead of special-casing a specific error type.

Changes

Cohort / File(s) Summary
Error Type Removal
bindings/go/credentials/plugins.go
Removed the exported ErrNoRepositoryPluginFound error variable and its import statement.
Error Handling Simplification
bindings/go/credentials/resolve_indirect.go
Updated resolveFromRepository to remove special-case handling for ErrNoRepositoryPluginFound; now returns a uniform error response when any repository plugin error occurs, instead of conditionally checking for the specific error type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • Skarlso
  • jakobmoellerdev

Poem

🐰 With a hop and a skip, we've tidied things up,
Removed that pesky error, no need to erupt!
Now all errors flow equal, both big and quite small,
One simple path forward—we've fixed it all! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the ErrNoRepositoryPluginFound error variable and replacing its usage with ErrNoIndirectCredentials, which aligns with both the code changes and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added kind/chore chore, maintenance, etc. size/s Small labels Mar 13, 2026
@frewilhelm frewilhelm marked this pull request as ready for review March 13, 2026 15:14
@frewilhelm frewilhelm requested a review from a team as a code owner March 13, 2026 15:14
@jakobmoellerdev jakobmoellerdev merged commit d2d37f9 into open-component-model:main Mar 13, 2026
20 checks passed
@frewilhelm frewilhelm deleted the rm-cred-typed-error branch March 16, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/chore chore, maintenance, etc. size/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants