-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HttpCacheMissException masks ApolloException in case of NETWORK_FIRST (…
…#3957) * HttpCacheMissException masks ApolloException in case of NETWORK_FIRST cache policy * Refactor ApolloCompositeException 1. Use Throwable.addSuppressed to ensure both stacktrace are thrown 2. Annotate with @throws to make sure client is aware of RuntimeExceptions * Replace with ApolloCompositeException in respect of code consistency * Update apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/CachingHttpInterceptor.kt Co-authored-by: Martin Bonnin <martin@mbonnin.net> * Simplify catch block suggested by @martinbonnin * For backward compatibility keep cause to secondException itself * @throws is only available for jvm packages * Reverted the parameter name changes * fix wrong calling argument name used * comments updated for ApolloCompositeException and NETWORK_FIRST fetch policy * Add both exceptions in ApolloCompositeExceptions as suppressed Also deprecate first and second exceptions usage * split if conditions Co-authored-by: Martin Bonnin <martin@mbonnin.net>
- Loading branch information
1 parent
9bd26f4
commit 6853ae8
Showing
4 changed files
with
53 additions
and
13 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
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
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
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