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

nailichev's avatar

Request with 404 error responce is called twice

There is a problem with 404 error in my app - if api responses 404 code, then request called again, but always with GET method and without query parameters.

For example, i do request GET /[email protected]. If it responses with 404 error code, this request repeat one more time, but without parameters - GET /emails. I saw it in logs - one request, but two lines in log.

Why does it happen?

0 likes
2 replies
OussamaMater's avatar

maybe share some code so we can help you debug this? your api controller code, and please make sure it's wrapped between ``` so it's nicely formatted.

nailichev's avatar

@OussamaMater I can share my code, but it does not depends on code - it happen with every route, when response is 404

Please or to participate in this conversation.