stellar / rs-stellar-xdr

Rust lib for Stellar XDR.
Apache License 2.0
20 stars 27 forks source link

Add test to check how errors are rendered #296

Closed leighmcculloch closed 1 year ago

leighmcculloch commented 1 year ago

What

Add test to check how errors are rendered.

Why

I wrote the test to confirm the behavior.

In output of stellar-xdr I saw the following:

{
  "error": {
    "type_": "contract",
    "code": "existing_value"
  }
}

Writing this test confirmed the correct rendering is:

{
  "error": {
    "contract": 4
   }
}

Committing this test because, why not.