wrapFederationResponse

suspend fun <T : Any> wrapFederationResponse(response: <Error class: unknown class>, delegatedHandler: suspend (<Error class: unknown class>) -> NetworkResponse<T>): NetworkResponse<T>

Wrap and handles federation aware endpoints that can send errors responses And raise specific federated context exceptions,

i.e. FederationError, FederationUnreachableException, FederationConflictException

Parameters

response

the response to wrap

delegatedHandler

the fallback handler when the response cannot be handled as a federation error