asClientException

provides a safe casting of throwable converts any throwable into a ClientException. Clients don't need to perform casting as its handled on the SDK level.

Return

a ClientException object when casting success else it will return a ClientException with the throwable as a cause