demo
                                
                                 demo copied to clipboard
                                
                                    demo copied to clipboard
                            
                            
                            
                        Improve errors when the locale is missing
Related to https://github.com/symfony/symfony-docs/pull/13135.
I don't know if it's technically possible, but I also faced a similar error in the past. Maybe we could create a listener that tries to recover from exceptions? Logic should be:
- Listen to exceptions
- In a try ... catchtry to load the same URI but with theenprefix (this assumes that you are missing the locale and adds it automatically)
- If the response of the new URI is an exception, throw the original exception ... otherwise, redirect to the new response.
But maybe this proposal is flawed ... or it's more complicated than some other solution that the community can suggest. Thanks!