Send 404 header in API when error