Closed georgleber closed 1 year ago
@dearrudam did you fix also at Graph, Key-value, and Column repository?
@otaviojava I created a PR for this. Sorry doing it parallel here
That is nice @georgleber!
@georgleber @otaviojava, I'm sorry for putting my fingers on it ... I'll try to talk to you before doing anything next time...
Don't worry Max. Thank you for your help.
@dearrudam I should have mentioned, that I am working on it. Hadn't enough time yesterday to solve the bug, but wanted to document it. Next time I will be more talkative 😄
Which JNoSQL project the issue refers to?
JNoSQL (Core)
Bug description
Failing validations with the repository pattern are not mappable by the
DefaultExceptionMapper
of Resteasy, because theConstraintValidationException
is encapsulated in aUndeclaredThrowableException
. Using the template it results correctly in theConstraintValidationException
.Problem is that the InvocationHandler (f.e.
AbstractDocumentRepositoryProxy
) is not analyzing the exception and just rethrowing it.JNoSQL Version
JNoSQL version 1.0.1-SNAPSHOT
Steps To Reproduce
curl --header "Content-Type: application/json" --request POST --data '{"isbn": "9x78-3-7657-2781-8","title": "Test","published": "2019-07-04T13:33:03.969Z","edition": "1","authors": [{"firstName": "Georg","lastName": "Leber","initials": "G."}]}' http://localhost:8080/jakarta-nosql-bookstore/api/books
Expected Results
Response Body: jakarta.validation.ConstraintViolationException: isbn: ISBN not valid (checksum is wrong)
Code example, screenshot, or link to a repository
Repository: https://github.com/georgleber/demo-ee Branch: bookstore