safe_invoke_contract in apexchainx_calculator/src/cross_contract_safety.rs collapses both recoverable and fatal downstream errors into a single hardcoded error_symbol = Symbol::new(env, "CROSS_CONTRACT_FAILURE"). The actual error value returned by the target contract is dropped on the floor, so backends cannot tell which downstream contract failed or under which error code. Preserve the raw error context by attaching the original error Val to SafeCallResult (which will require annotating the struct with #[contracttype] per #16 of the planned follow-ups), or by deriving an explanatory symbol from the contract address plus function name. Add tests proving that two distinct downstream error paths produce two distinguishable error_symbol values rather than the same string.
safe_invoke_contractinapexchainx_calculator/src/cross_contract_safety.rscollapses both recoverable and fatal downstream errors into a single hardcodederror_symbol = Symbol::new(env, "CROSS_CONTRACT_FAILURE"). The actual error value returned by the target contract is dropped on the floor, so backends cannot tell which downstream contract failed or under which error code. Preserve the raw error context by attaching the original errorValtoSafeCallResult(which will require annotating the struct with#[contracttype]per #16 of the planned follow-ups), or by deriving an explanatory symbol from the contract address plus function name. Add tests proving that two distinct downstream error paths produce two distinguishableerror_symbolvalues rather than the same string.