async fn report_error(
    sender: Sender<Result<SendEndorsementsResponse, Status>>,
    code: Code,
    error: String
)