Skip to main content

verify_refusal_code

Function verify_refusal_code 

Source
pub fn verify_refusal_code(error: &str) -> Option<&str>
Expand description

Pull a known verify refusal code out of a host error string, if (and only if) it is one of the six codes the host’s refusal shape carries.

Accepts either a bare code ("device_revoked"), a wire form ("device_revoked: detail"), or the production capability-bus shape ("core.device_session.verify failed: device_revoked: detail"). An invocation failure ("… invocation failed: …") never parses to a code.