Skip to main content

JOB_ONLY_CODES

Constant JOB_ONLY_CODES 

Source
pub const JOB_ONLY_CODES: [&str; 12];
Expand description

The server error codes no person meets, which therefore have no exit code of their own and fall to UNKNOWN_SERVER_ERROR (21) if they ever reach the client.

The first ten are the answers a job sees on its lease socket: the pod proxy’s own refusals (lease_revoked, outside_grant, lease_starting, lease_expired, busy, pod_auth_refused) and the signer’s refusals the proxy relays (key_disabled, no_window, outside_pod, payload_rule). The last two are the runner’s refusals, which only the controller sees (container_identity_conflict, create_expired). No route a person calls answers any of them: a person signs with their own key, never through a lease.

§Examples

use stratum_node_cli::exit;

for code in exit::JOB_ONLY_CODES {
    assert_eq!(exit::for_server_code(code), exit::UNKNOWN_SERVER_ERROR);
}