Tezos Asked by Ivan Gromakovskii on August 20, 2021
There is a list of all possible RPC errors at this page: http://tezos.gitlab.io/api/errors.html
According to my experiments, these errors are returned differently. I found at least two different ways to return an error in response to run_operation
:
operation_result
object for the errors
key.Example of 1:
{"contents":[{"kind":"transaction","source":"tz1V8fDHpHzN8RrZqiYCHaJM9EocsYZch5Cy","fee":"0","counter":"3","gas_limit":"1040000","storage_limit":"60000","amount":"0","destination":"KT1GExrhg5QdAMuzhKv3KbrXDQUDBMAeduvk","metadata":{"balance_updates":[],"operation_result":{"status":"failed","errors":[{"kind":"temporary","id":"proto.006-PsCARTHA.michelson_v1.runtime_error","contract_handle":"KT1GExrhg5QdAMuzhKv3KbrXDQUDBMAeduvk","contract_code":[{"prim":"storage","args":[{"prim":"unit"}]},{"prim":"parameter","args":[{"prim":"unit"}]},{"prim":"code","args":[[{"prim":"CAR"},{"prim":"FAILWITH"}]]}]},{"kind":"temporary","id":"proto.006-PsCARTHA.michelson_v1.script_rejected","location":8,"with":{"prim":"Unit"}}]}}}]}
Example of 2:
[{"kind":"temporary","id":"proto.006-PsCARTHA.contract.counter_in_the_future","contract":"tz1V8fDHpHzN8RrZqiYCHaJM9EocsYZch5Cy","expected":"2","found":"3"}]
I have two questions:
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP