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

[DE-682] unify exception handling #281

Closed
aburmeis opened this issue Sep 5, 2023 · 3 comments
Closed

[DE-682] unify exception handling #281

aburmeis opened this issue Sep 5, 2023 · 3 comments

Comments

@aburmeis
Copy link
Contributor

aburmeis commented Sep 5, 2023

Currently Arango Spring Data handles ArangoDBException using ArangoExceptionTranslator for most methods of ArangoOperations except the query() ones. This is not handy and not what a user would expect from a Spring Data implementation as all queries (derived queries and those using @Query annotation) end up in a query call throwing ArangoDBException instead of the expected DataAccessException.

So even query() should use exception translation and maybe ArangoExceptionTranslator could be improved using error numbers to translate exceptions more specific.

aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
@rashtao
Copy link
Collaborator

rashtao commented Sep 5, 2023

In ba4a37f I reverted your changes to translate via ArangoExceptionTranslator exceptions in ArangoOperations.query().

@rashtao rashtao changed the title unify exception handling [DE-682] unify exception handling Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 5, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
aburmeis added a commit to aburmeis/spring-data that referenced this issue Sep 6, 2023
@aburmeis
Copy link
Contributor Author

aburmeis commented Sep 6, 2023

@rashtao thanks, so this ist mostly a better exception translation

rashtao added a commit that referenced this issue Sep 6, 2023
* #281 use data access utils for exception handling

* #281 translate exceptions for query

* #281 more specific exception translation

* #281 test query exception translation

* #281 declare error constants, translator returns null for unsupported exceptions

* Update src/main/java/com/arangodb/springframework/core/util/ArangoExceptionTranslator.java

---------

Co-authored-by: Michele Rastelli <rashtao@gmail.com>
@rashtao
Copy link
Collaborator

rashtao commented Sep 6, 2023

fixed in #282

@rashtao rashtao closed this as completed Sep 6, 2023
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

No branches or pull requests

2 participants