Closed galacticgumshoe closed 1 year ago
Update: I discovered there is a compiled class called ApiException_Exception
which is Throwable. I've used that in the catch block and have tested that I am seeing the expected behavior when handling exceptions and retrying. Seems a little odd the use of Upper Camel and Snake Case for this class, and I can't really find it in the source code or the API documentation. Still, seems to function the same as ApiException
from the dfp-axis jar, so will close this issue.
I'm following the workaround described in issue #240 to avoid being flagged by my security teams as vulnerable to CVE-2019-0227 and other medium-level vulnerabilities. Namely, I've replaced the dependency on
dfp-axis
withdfp-appengine
since it appears you are not planning to upgrade the transitive dependency onaxis
toaxis2
.Aside from a completely different package structure, and the use of Lists instead of Arrays, I'm encountering a kind of significant issue with exception handling. In
dfp-axis
I could catch an ApiException in a try-catch block, because it was an extension ultimately of a base class that extended Throwable. The ApiException class indfp-appengine
doesn't appear to be an extension of Throwable, and can't be caught. This is useful in my ForecastService calls in order to pull out the Array of ApiError classes (now a List of ApiError) so that I could determine whether the corresponding error was one of EXCEEDED_QUOTA, INTERNAL_ERROR, SERVER_NOT_AVAILABLE (from the ForecastErrorReason enum) in order to do a backOff and retry later or fail the attempt. I'm onv202211
and here's a snippet of my catch block which the compiler errors on due to this ApiException class not Throwable: