I have been bitten by this really bad idea of reusing HTTP CODE for application problems. The server was 404 itself instead of the application.
It is a bad engineering idea to reuse HTTP codes that can be thrown by multiple intermediaries confusing the client code.