-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adapt DuplicateKeyException on insertSessionAttributes to new SQL Exception Translator #2108
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
Comments
marcusdacoregio
added a commit
to marcusdacoregio/spring-session
that referenced
this issue
Jul 11, 2022
…eption Translator Closes spring-projectsgh-2108
marcusdacoregio
added a commit
to marcusdacoregio/spring-session
that referenced
this issue
Jul 18, 2022
marcusdacoregio
added a commit
to marcusdacoregio/spring-session
that referenced
this issue
Jul 18, 2022
marcusdacoregio
added a commit
to marcusdacoregio/spring-session
that referenced
this issue
Jul 18, 2022
marcusdacoregio
added a commit
to marcusdacoregio/spring-session
that referenced
this issue
Jul 20, 2022
marcusdacoregio
added a commit
to marcusdacoregio/spring-session
that referenced
this issue
Jul 20, 2022
marcusdacoregio
added a commit
that referenced
this issue
Jul 20, 2022
Closed via #2113 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The commit spring-projects/spring-framework@083113d changed the way that exceptions are translated from the database exception. In some of our tests, what before was a
DuplicateKeyException
now is aDataIntegrityViolationException
and we ignore theDataIntegrityViolationException
. See:spring-session/spring-session-jdbc/src/main/java/org/springframework/session/jdbc/JdbcIndexedSessionRepository.java
Lines 506 to 520 in abce2eb
The code should be adapted to the new behavior. It is important to note that in case of a duplicate key we should still consider throwing an exception since it is a clue to users that they need to expose a
SessionRepositoryCustomizer
Bean (see #1213)The text was updated successfully, but these errors were encountered: