Fix crash when checking for new messages

Check error in callback of request.get.