-
Notifications
You must be signed in to change notification settings - Fork 332
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
Change http status code on interceptor #1035
Comments
I got it fixed here by overriding @csokol @Turini let's change those classes to do not flush the |
@nykolaslima that sounds reasonable to me... i'm just not sure if it'll break any expected |
From the tests I've made everything works fine. I believe that flush is already called somewhere, maybe it should be called from application server and not from application code. @Turini |
@nykolaslima, I guess overriding |
I guess it solves the |
Huum, strange, why is Result#status related with json serialization? On Mon, Dec 7, 2015 at 12:01 PM Nykolas Laurentino de Lima <
|
Sorry @csokol, you are right. |
I have a simple controller:
But there is a
HibernateTransactionInterceptor
that commits the database transaction at the end of the request. But if there is some error commiting the request, I want to change the response status:But the response was already commited and then the returned http code is the created(201) that was configured in the controller.
Is there any way to fix it? @Turini
The text was updated successfully, but these errors were encountered: