pub fn exit_code_for_error(err: &(dyn Error + 'static)) -> i32
Map an error to a specific exit code by downcasting to ApiError.