Skip to main content

apply_request_level_outcome

Function apply_request_level_outcome 

Source
pub(crate) async fn apply_request_level_outcome(
    conn: &mut PgConnection,
    endpoint: SuotarEndpoint,
    row: &CreditRegistration,
    request: &Value,
    error: &UtilError,
    expected_from_state: CreditRegistrationState,
) -> Result<bool>
Expand description

Applies one request-level outcome to one row of a batch the study registry rejected whole. Returns whether the row ended up carrying an error code.

expected_from_state is the state the phase’s own preflight put every row in, since the rows were read before that transition and are stale by the time this runs.