Why don't I receive an error when attempting to call a non-existent get method?
Why don't I receive an error when attempting to call a non-existent get method?
Using the JSON API, I'm attempting to call a get method on a non existing method on a smart contract.
I send a POST request to `/runGetMethod`.
```
{
"address": "...",
"method": "nonexistentmethodname",
"stack": []
}
```
I expect to get an error, but I get the result shown below:
```
{
"ok": true,
"result": {
"@type": "smc.runResult",
"gas_used": 0,
"stack": [
[
"num",
"0x1083b"
]
],
"exit_code": -13,
"@extra": "1661342201.3654168:14:0.5828632398991145"
}
}
```
Does the "-13" refer to the error code 13?
```
13 - Out of gas error. Thrown by TVM when the remaining gas becomes negative.
```
---
> This question was imported from Telegram Chat: https://t.me/tondev_eng/9996
Using the JSON API, I'm attempting to call a get method on a non existing method on a smart contract.
I send a POST request to `/runGetMethod`.
```
{
"address": "...",
"method": "nonexistentmethodname",
"stack": []
}
```
I expect to get an error, but I get the result shown below:
```
{
"ok": true,
"result": {
"@type": "smc.runResult",
"gas_used": 0,
"stack": [
[
"num",
"0x1083b"
]
],
"exit_code": -13,
"@extra": "1661342201.3654168:14:0.5828632398991145"
}
}
```
Does the "-13" refer to the error code 13?
```
13 - Out of gas error. Thrown by TVM when the remaining gas becomes negative.
```
#smart-contract
#rpc
#get
#http-api
Why don't I receive an error when attempting to call a non-existent get method?
Using the JSON API, I'm attempting to call a get method on a non existing method on a smart contract.
I send a POST request to `/runGetMethod`.
```
{
"address": "...",
"method": "nonexistentmethodname",
"stack": []
}
```
I expect to get an error, but I get the result shown below:
```
{
"ok": true,
"result": {
"@type": "smc.runResult",
"gas_used": 0,
"stack": [
[
"num",
"0x1083b"
]
],
"exit_code": -13,
"@extra": "1661342201.3654168:14:0.5828632398991145"
}
}
```
Does the "-13" refer to the error code 13?
```
13 - Out of gas error. Thrown by TVM when the remaining gas becomes negative.
```