-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve error handling in Transport.kt (#1540)
- Provide HTTP request and response details on SDKErrorResponse. - Provide the cause of SDKError for chaining and re-throwing - Add LookerApiException, which includes the same request/response information as SDKErrorResponse. - Mark ok() as Deprecated, because it throws java.lang.Error, which is not something application code should do. - Add SDKResponse::getOrThrow() instance method, patterned after Kotlin's built-in Result type, which handles SDKErrorResponse by throwing the newly introduced LookerApiException Fixes #1539 🦕
- Loading branch information
1 parent
1436368
commit a091549
Showing
1 changed file
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters