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
If the request was successfully marked as dead, returns a success with Unit
If the request is not found, the result will be a failure with PostboxError.RequestNotFound
If the request has been already processed, the result will be a failure with PostboxError.StorageFailure
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.