The session gets cleared if the refresh operation fails, no matter the cause/status code. You also cannot get the exception the refresh operation fails with in your code.
What is the new behavior?
SessionStatus has been moved to its own status package. There have been changes to two statuses:
LoadingFromStorage -> InitializingNetworkError -> data class RefreshFailure(cause)
The cause can be one of two things:
What kind of change does this PR introduce?
Feature and Bug fix (closes #724)
What is the current behavior?
The session gets cleared if the refresh operation fails, no matter the cause/status code. You also cannot get the exception the refresh operation fails with in your code.
What is the new behavior?
SessionStatus
has been moved to its ownstatus
package. There have been changes to two statuses:LoadingFromStorage
->Initializing
NetworkError
->data class RefreshFailure(cause)
The cause can be one of two things:RefreshFailureCause.NetworkError(exception: Throwable)
RefreshFailureCause.InternalServerError(exception: RestException)
Additional context
Add any other context or screenshots.