Returning 404 on error conditions