added handling of error updating access token