You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as you can see, I'm trying to create a routeRedirectResponse with Codes::HTTP_SEE_OTHER as the status code and fos_user_profile_show as the route name. I'm trying to read the response later on the client side and according to the status code (204, 200, etc.) do an action. if the response is HTTP_SEE_OTHER, I'd be reading the location header value to find the redirection location and handle the request manually...
but FOSRestBundle keeps throwing the "InvalidArgumentException":
The HTTP status code "0" is not valid.
500 Internal Server Error - InvalidArgumentException
I traced the error to FOS\RestBundle\View\ViewHandler.php line: 274 :
this line checks the value of my fos_rest config, find the force_redirects value for html format to be "false" and simply replaces my given status_code with a "false" value; which later on results in the http status code to be "0".
I'm not sure if this means that I have misconfigured the bundle or this could actually be a bug in the system. Could anyone please advise me on this matter?
The text was updated successfully, but these errors were encountered:
Hi everyone!
I'm using FOSRestBundle to manage a profile edit form and am getting
when trying to send redirection response to the client.
I've configured fos_rest as followed:
my respective action function is as followed:
as you can see, I'm trying to create a routeRedirectResponse with Codes::HTTP_SEE_OTHER as the status code and fos_user_profile_show as the route name. I'm trying to read the response later on the client side and according to the status code (204, 200, etc.) do an action. if the response is HTTP_SEE_OTHER, I'd be reading the location header value to find the redirection location and handle the request manually...
but FOSRestBundle keeps throwing the "InvalidArgumentException":
I traced the error to FOS\RestBundle\View\ViewHandler.php line: 274 :
this line checks the value of my fos_rest config, find the force_redirects value for html format to be "false" and simply replaces my given status_code with a "false" value; which later on results in the http status code to be "0".
I'm not sure if this means that I have misconfigured the bundle or this could actually be a bug in the system. Could anyone please advise me on this matter?
The text was updated successfully, but these errors were encountered: