I forgot the reason for the question) The main problem was that when you request /api/some to send a 404 chttpexception in response, there will be an error on the client due to OPTIONS. I expected that 404 would be processed correctly and the client would receive JSON with an error (in fact, it works, only OPTIONS breaks).