I'm using Laravel with laravel-cors package as the back-end. I'm making API request with axios from a different domain. Basically everything works fine.
Then I created this new route to retrieve a single object by id. When an object with the id exists I get a normal response with the data. When it doesn't - I get a normal 404 response (checked in the network tab), except in the console I get this error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://... (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Also, axios determines it not as a 404 error, but as an unknown "Network Error". I can't act on this response properly in my SPA and I believe this is not an expected behavior.