markDead

open override fun markDead(requestId: RequestId, response: Response? = null): Result<Unit, PostboxError>(source)

Mark a request as permanently failed (dead) with an optional response.

Return

Parameters

requestId

the id of the request to mark as dead

response

the response to store with the dead request (optional)

For a pending or processing request, the stored response is replaced with the provided one (or cleared if none is provided). For a request that has already been marked as dead, the first stored response is retained, and a missing response is filled with the provided one. Subsequent responses will be ignored.