when the res.url will be undefined/null?