Record the refresh token length in the get devices breadcrumb

My current theory is that this happens when we send FxA an invalid
refresh token.  Maybe this extra data in the breadcrumb will help
identify that. See the bug for details.
This commit is contained in:
Ben Dean-Kawamura 2023-12-27 13:42:07 -05:00 коммит произвёл bendk
Родитель 57ecda94fa
Коммит 0417e91b2a
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -368,7 +368,10 @@ impl FxAClient for Client {
fn get_devices(&self, config: &Config, refresh_token: &str) -> Result<Vec<GetDeviceResponse>> {
let url = config.auth_url_path("v1/account/devices")?;
let timestamp = util::past_timestamp(DEVICES_FILTER_DAYS).to_string();
breadcrumb!("get_devices timestamp: {timestamp}");
breadcrumb!(
"get_devices timestamp: {timestamp}, refresh_token.len(): {}",
refresh_token.len()
);
let request = Request::get(url)
.header(header_names::AUTHORIZATION, bearer_token(refresh_token))?
.query(&[("filterIdleDevicesTimestamp", &timestamp)]);