Improve OAuth logging
Description
Release Notes
Activity

Masoud Saeida Ardekani October 24, 2023 at 5:59 PM
Also, getOAuthCredential only throws the response code and does not include the reason: https://github.com/cdapio/cdap/blob/develop/cdap-app-templates/cdap-etl/cdap-data-pipeline-base/src/main/java/io/cdap/cdap/datapipeline/service/OAuthHandler.java#L229
This also needs to be changed.

Masoud Saeida Ardekani October 24, 2023 at 5:56 PM
Any failure during OAuth macro evaluation is logged as Timed out when trying to evaluate
: https://github.com/cdapio/cdap/blob/develop/cdap-app-templates/cdap-etl/cdap-etl-core/src/main/java/io/cdap/cdap/etl/common/AbstractServiceRetryableMacroEvaluator.java#L93C38-L93C71
Instead, RetryableExceptions should be logged: https://github.com/cdapio/cdap/blob/develop/cdap-app-templates/cdap-etl/cdap-etl-core/src/main/java/io/cdap/cdap/etl/common/AbstractServiceRetryableMacroEvaluator.java#L79
Failures when refreshing OAuth tokens are not properly logged that result in not being able to correctly root cause the issue.