Skip to content

Commit ed0a26a

Browse files
committed
📝 Documentation
1 parent 780a024 commit ed0a26a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/oauth2/client.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,10 @@ def build_access_token(response, access_token_opts, access_token_class)
535535
# @api private
536536
def build_access_token_legacy(response, access_token_opts, extract_access_token)
537537
extract_access_token.call(self, response.parsed.merge(access_token_opts))
538-
rescue StandardError
538+
rescue
539+
# An error will be raised by the called if nil is returned and options[:raise_errors] is truthy, so this rescue is but temporary.
540+
# Unfortunately, it does hide the real error, but this is deprecated legacy code,
541+
# and this was effectively the long-standing pre-existing behavior, so there is little point in changing it.
539542
nil
540543
end
541544

0 commit comments

Comments
 (0)