Skip to main content

record_corr

Function record_corr 

Source
pub fn record_corr(result: &Result<Response, Error>)
Expand description

Progenitor post-hook: records the correlation id from a completed request.

The generated client invokes (crate::record_corr)(&result) after every exec, before the response is unwrapped, so this sees both 2xx and error (4xx/5xx) responses — those still join, so their id is kept.

A transport failure (Err) carries no response, so it clears the stored id: otherwise a later transport error in a multi-call command would leave a stale corr from an earlier request and wrongly join the failure’s line.