Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

carlosgomezmx's avatar

$request->validate causes 502 Bad Gateway

I deployed an exact copy of my project to vapor and to a vm

The version hosted on the VM works as expected but the version on Vapor everytime it runs into a $request->validate() instead of redirecting back to the form, it returns the 502 bad gateway error

when the validation rules pass, the controller continues working properly, it only fails when the validation fails and need to redirect

Has anyone run into something like this?

0 likes
1 reply
carlosgomezmx's avatar

Update: I deployed to the vapor prooduction enviroment and it works on production Exact same code base, what could be wrong?

Please or to participate in this conversation.