It looks like when I hit the route with anything other then the browser it returns the proper error code and message. I have a feeling it has something to do with the frontend. Thank you to everyone who posted about my code being correct.