Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have better error handling #90

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

holgerstolzenberg
Copy link

Description

Fixes #89

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

dependabot bot and others added 2 commits February 19, 2025 14:05
Introduce OpenFgaExceptionHandler class that eases access to OpenFGA exception
root cause data exposing the actual FgaError through the exception. The new
handler gets autoconfigured on missing bean.

Renamed OpenFgaCheckException.java to OpenFgaException to be more generic
for later use cases.

Also did some small cleanups and refactorings
- use Spring managed dependency for Hamcrest
- use Spring managed dependency for Mockito
- have OpenFGA SDK version externalized to gradle.properties
- have jackson-databind-nullable version externalized to gradle.properties
- introduce @UnitTest meta annotation
- used shorted var syntax in some places, yet could be applied to whole project
- added some AI generated JavaDoc

Fixes openfga#89
@holgerstolzenberg holgerstolzenberg requested a review from a team as a code owner February 19, 2025 13:10
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.

Enhancement: Have better error information in OpenFGA exceptions
1 participant