Handling 404 return code