augment_revert_reason

Function augment_revert_reason 

Source
pub(crate) fn augment_revert_reason(
    message: &str,
    reason: &str,
    receipts: Option<&Value>,
) -> String
Expand description

Return a human-readable error name decoded from the backend’s error response.

Tries multiple strategies in priority order:

  1. Extract the error variant from the backend’s decoded LogResult
  2. Parse the LogData receipt (logId + discriminant) from embedded receipts
  3. Recognize Fuel VM signal constants
  4. Extract PanicInstruction reason
  5. Extract and error: summary
  6. Truncate raw reason as last resort