Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logs to exception on read_contract error #800

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

mvandeberg
Copy link
Member

Resolves #796

Brief description

Add logs to exception on read_contract error

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

$ curl -d '{"jsonrpc":"2.0", "method":"chain.read_contract", "params":{"contract_id":"15AJB59oTTNConTu9krF7ZnjbmBydSnfYA"}, "id":0}' http://localhost:8080/ | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   255  100   135  100   120   8605   7649 --:--:-- --:--:-- --:--:-- 36428
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32603,
    "message": "reversion message",
    "data": "{\"code\":1,\"logs\":[\"log before an error\"]}"
  },
  "id": 0
}

@mvandeberg mvandeberg requested a review from sgerbino December 14, 2022 19:09
@sgerbino sgerbino changed the title Add logs to exception on read_contract error Add logs to exception on read_contract error Dec 14, 2022
@sgerbino sgerbino merged commit 24454f6 into master Dec 14, 2022
@sgerbino sgerbino deleted the 796-read-conract-error-logs branch December 14, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Logs are not returned when there is an error reading a contract
2 participants