Reconsider using checked exceptions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- java
- Domain
- authorization
Research direction
Start by reviewing the SDK's checked exception types, including FgaInvalidParameterException, and the operations that report missing or invalid store IDs. The issue does not identify files or tests; done would require a decided scope for which exceptions change and consistent API behavior across the affected cases.
Written by the indexing model from the issue text.
Description
The SDK throws checked exceptions in several cases, e.g. when the store ID is missing or invalid. I request these be unchecked instead.
Checked exceptions were a Java feature intended for errors that you could recover from on the fly -- while the application is running and the scope has not elapsed. That describes a limited set of error conditions. At least some exceptions thrown by this SDK (e.g. FgaInvalidParameterException) don't fit this description. They are only going to be fixable by making code and/or configuration changes. This is especially true if the operation is being performed in something that has a limited scope, such as an API with request scoping.
Using checked exceptions in most cases provides no benefit, and forces the developer to wrap them in unchecked RuntimeExceptions, which adds noise to both the code and the logging/monitoring output.
- Dominant language
- Java
- Stars
- 54
- Forks
- 26
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openfga/java-sdk
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement needs-discussion
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in openfga/java-sdk
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
inu-appcenter/memorIN-backend#288 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
frontend maui-pilot pilot-ask question
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·