BaseErrorResponseInterceptor

A base implementation of the ErrorResponseInterceptor interface used for intercepting HTTP responses. This will only return NetworkResponse.Error, never null. And will attempt to map whatever response body to a GenericAPIErrorResponse object, the "default" error type when dealing with Wire API.

Functions

Link copied to clipboard
open suspend override fun intercept(httpResponseData: HttpResponseData): NetworkResponse.Error

Intercepts the provided HTTP response to determine if it can be mapped to a specific NetworkResponse.