Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a helper to determine if an exception is from a `304 Not Modified…
…` response. In practice, Ktor will throw a `RedirectResponseException` on a `304 Not Modified` server result. This small helper lets us avoid having to repeat ourselves with a cast and status check when we're trying to determine what happened in our exception handling: ```kotlin try { val (response, responseHeaders) = exampleService.getCacheData(...) } catch (e: ServiceException) { if (e.isNotModifiedException()) { // Ignore, local cache is not stale. } } ```
- Loading branch information