Skip to content

Commit

Permalink
using CompilationFailed data only for 0.8 JSON-RPC API
Browse files Browse the repository at this point in the history
  • Loading branch information
vbar committed Jan 6, 2025
1 parent e15d94d commit f834295
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions crates/rpc/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,14 @@ impl ApplicationError {
ApplicationError::InsufficientResourcesForValidate => None,
ApplicationError::InsufficientAccountBalance => None,
ApplicationError::ValidationFailure => None,
ApplicationError::CompilationFailed { data } => Some(json!({
"data": data,
})),
ApplicationError::CompilationFailed { data } => match version {
RpcVersion::V08 => {
Some(json!({
"data": data,
}))
}
_ => None
},
ApplicationError::ContractClassSizeIsTooLarge => None,
ApplicationError::NonAccount => None,
ApplicationError::DuplicateTransaction => None,
Expand Down

0 comments on commit f834295

Please sign in to comment.