Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2801,6 +2801,7 @@ def create_oauth_authenticator(
).eval(config),
scopes=model.scopes,
token_expiry_date_format=model.token_expiry_date_format,
token_expiry_is_time_of_expiration=bool(model.token_expiry_date_format),
message_repository=self._message_repository,
refresh_token_error_status_codes=model.refresh_token_updater.refresh_token_error_status_codes,
refresh_token_error_key=model.refresh_token_updater.refresh_token_error_key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,15 @@ def _make_handled_request(self) -> Any:
data=self.build_refresh_request_body(),
headers=self.build_refresh_request_headers(),
)
response_json = response.json()
# extract the access token and add to secrets to avoid logging the raw value
access_key = self._extract_access_token(response_json)
if access_key:
add_to_secrets(access_key)
# log the response even if the request failed for troubleshooting purposes
self._log_response(response)
response.raise_for_status()
return response.json()
return response_json
except requests.exceptions.RequestException as e:
if e.response is not None:
if e.response.status_code == 429 or e.response.status_code >= 500:
Expand Down
Loading