markFailed
open override fun markFailed(requestId: RequestId, delayReprocessing: Duration, response: Response?): Result<Unit, PostboxError>
Mark a request as failed with the given delay for reprocessing and an optional response.
Return
If the request was successfully marked as failed, the result will be 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 or marked as dead, the result will be a failure with PostboxError.StorageFailure
Parameters
requestId
the id of the request to mark as failed
delayReprocessing
the delay before reprocessing the request
response
the response to store with the failed request (optional)
If a response is provided, it overrides any previously stored one.