handle request error to avoid crash