This exception is used to preserve the caller's stacktrace when invoking an async task in a sync
context. It will be added as a suppressed exception when propagating the async exception. This
allows callers to catch ApiException thrown in an async operation, while still maintaining the
call site.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides documentation for the \u003ccode\u003eAsyncTaskException\u003c/code\u003e class within the Google API Client Library for Java, specifically the \u003ccode\u003ecom.google.api.gax.rpc\u003c/code\u003e package.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAsyncTaskException\u003c/code\u003e is a \u003ccode\u003eRuntimeException\u003c/code\u003e designed to preserve the stack trace when an asynchronous task is executed in a synchronous context, ensuring that the origin of the exception is maintained.\u003c/p\u003e\n"],["\u003cp\u003eThe exception can be caught when an \u003ccode\u003eApiException\u003c/code\u003e is thrown in an asynchronous context, while simultaneously preserving the original call site information for debugging.\u003c/p\u003e\n"],["\u003cp\u003eThis page contains links to documentation of the \u003ccode\u003eAsyncTaskException\u003c/code\u003e for several versions of the library ranging from version 2.7.1 up to the latest version, 2.63.1.\u003c/p\u003e\n"]]],[],null,[]]