Skip to content

refactor(identity): aligned error-handling and added dependency injection; removed obsolete code#294

Draft
ron96g wants to merge 4 commits intomainfrom
refactor/identity-error-handling-and-dependency-injection
Draft

refactor(identity): aligned error-handling and added dependency injection; removed obsolete code#294
ron96g wants to merge 4 commits intomainfrom
refactor/identity-error-handling-and-dependency-injection

Conversation

@ron96g
Copy link
Copy Markdown
Member

@ron96g ron96g commented Mar 24, 2026

  • refactor(common): migrate error handling from pkg/errors to stdlib errors.As
  • refactor(identity): simplify keycloak client and remove grafana dashboards
  • refactor(identity): consolidate handlers and improve dependency injection

ron96g and others added 4 commits March 24, 2026 11:36
…rors.As

Replace errors.Cause() with errors.As() to properly unwrap error chains
created with both pkg/errors.Wrap and fmt.Errorf %w. Add tests for
wrapped error scenarios and fix typos (updatd -> updated, deley -> delay).

Extract NewBaseHttpClient() from NewHttpClientOrDie() to allow callers
to compose additional transports (e.g. OAuth2) before applying metrics.
…oards

Refactor keycloak client factory to use NewBaseHttpClient for composable
transport setup and improve error classification in client_error.go.
Remove custom_metrics.go and kubebuilder grafana plugin config along
with all generated dashboard JSONs. Regenerate mocks for updated
interfaces.
…tion

Merge status.go into handler.go for client, realm, and identityprovider
handlers. Inject keycloak.ClientFactory into handlers and controllers
instead of creating clients inline. Add field index registration via
new index.go and wire it in main.go. Move model defaults from
internal/model to internal/testutil/fixtures. Add comprehensive handler
unit tests with Ginkgo suite scaffolding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant