{"action":"closed","issue":{"url":"https://api.github.com/repos/stellar/horizon/issues/219","labels_url":"https://api.github.com/repos/stellar/horizon/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/stellar/horizon/issues/219/comments","events_url":"https://api.github.com/repos/stellar/horizon/issues/219/events","html_url":"https://github.com/stellar/horizon/issues/219","id":122056378,"number":219,"title":"POST /transactions response `extras` field inconsistent","user":{"login":"bartekn","id":464938,"avatar_url":"https://avatars.githubusercontent.com/u/464938?v=3","gravatar_id":"","url":"https://api.github.com/users/bartekn","html_url":"https://github.com/bartekn","followers_url":"https://api.github.com/users/bartekn/followers","following_url":"https://api.github.com/users/bartekn/following{/other_user}","gists_url":"https://api.github.com/users/bartekn/gists{/gist_id}","starred_url":"https://api.github.com/users/bartekn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartekn/subscriptions","organizations_url":"https://api.github.com/users/bartekn/orgs","repos_url":"https://api.github.com/users/bartekn/repos","events_url":"https://api.github.com/users/bartekn/events{/privacy}","received_events_url":"https://api.github.com/users/bartekn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T14:45:49Z","updated_at":"2015-12-14T18:21:13Z","closed_at":"2015-12-14T18:21:13Z","body":"`extras` field is not consistent/possible for all `POST /transactions` responses. It makes it difficult to deserialize response in static typed languages.\r\n\r\nDesired response for success:\r\n```json\r\n{\r\n  \"_links\": {\r\n    \"transaction\": {\r\n      \"href\": \"https://horizon-testnet.stellar.org/transaction/4a16460475232245d87668a4cad0d138e307751f9cd60dde2397cad906e2d895\"\r\n    }\r\n  },\r\n  \"hash\": \"4a16460475232245d87668a4cad0d138e307751f9cd60dde2397cad906e2d895\",\r\n  \"ledger\": 1303790,\r\n  \"extras\": {\r\n    \"envelope_xdr\": \"AAAAAIyonCip/4Rbc4iC5/6/DIsQuFOzuHlwCH0OjQ8fqaiMAAAAZAAT38MAAAAFAAAAAAAAAAEAAAAWdGVzdCBhY2NvdW50IGZvciBNaWZvcwAAAAAAAQAAAAEAAAAAjKicKKn/hFtziILn/r8MixC4U7O4eXAIfQ6NDx+pqIwAAAAAAAAAANX/d4TJeTOjZlQ+w08cdTqBQkFJWEOZox1nFa4aAAv8AAAAAAvrwgAAAAAAAAAAAR+pqIwAAABAkCqOe0wnUSsmLfjXl2FjObCGf30OQ/5fLMyODEku+MwP+9E7yk+RN3b/MFN61XIrJ6OThzxqUKkiH2fl0jxUAg==\",\r\n    \"result_xdr\": \"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=\",\r\n    \"result_meta_xdr\": \"AAAAAAAAAAEAAAACAAAAAAAT5O4AAAAAAAAAANX/d4TJeTOjZlQ+w08cdTqBQkFJWEOZox1nFa4aAAv8AAAAAAvrwgAAE+TuAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAT5O4AAAAAAAAAAIyonCip/4Rbc4iC5/6/DIsQuFOzuHlwCH0OjQ8fqaiMAAAAFzCfYgwAE9/DAAAABQAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA\"\r\n  }\r\n}\r\n```\r\nI think adding `status` field would be helpful too.\r\n\r\n---\r\nCurrent success response:\r\n```json\r\n{\r\n  \"_links\": {\r\n    \"transaction\": {\r\n      \"href\": \"https://horizon-testnet.stellar.org/transaction/4a16460475232245d87668a4cad0d138e307751f9cd60dde2397cad906e2d895\"\r\n    }\r\n  },\r\n  \"hash\": \"4a16460475232245d87668a4cad0d138e307751f9cd60dde2397cad906e2d895\",\r\n  \"ledger\": 1303790,\r\n  \"envelope_xdr\": \"AAAAAIyonCip/4Rbc4iC5/6/DIsQuFOzuHlwCH0OjQ8fqaiMAAAAZAAT38MAAAAFAAAAAAAAAAEAAAAWdGVzdCBhY2NvdW50IGZvciBNaWZvcwAAAAAAAQAAAAEAAAAAjKicKKn/hFtziILn/r8MixC4U7O4eXAIfQ6NDx+pqIwAAAAAAAAAANX/d4TJeTOjZlQ+w08cdTqBQkFJWEOZox1nFa4aAAv8AAAAAAvrwgAAAAAAAAAAAR+pqIwAAABAkCqOe0wnUSsmLfjXl2FjObCGf30OQ/5fLMyODEku+MwP+9E7yk+RN3b/MFN61XIrJ6OThzxqUKkiH2fl0jxUAg==\",\r\n  \"result_xdr\": \"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=\",\r\n  \"result_meta_xdr\": \"AAAAAAAAAAEAAAACAAAAAAAT5O4AAAAAAAAAANX/d4TJeTOjZlQ+w08cdTqBQkFJWEOZox1nFa4aAAv8AAAAAAvrwgAAE+TuAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAT5O4AAAAAAAAAAIyonCip/4Rbc4iC5/6/DIsQuFOzuHlwCH0OjQ8fqaiMAAAAFzCfYgwAE9/DAAAABQAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA\"\r\n}\r\n```\r\nCurrent failure response:\r\n```json\r\n{\r\n  \"type\": \"https://stellar.org/horizon-errors/transaction_failed\",\r\n  \"title\": \"Transaction Failed\",\r\n  \"status\": 400,\r\n  \"detail\": \"The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html\",\r\n  \"instance\": \"horizon-testnet-001.prd.stellar001.internal.stellar-ops.com/70Gr0Hs0dw-075866\",\r\n  \"extras\": {\r\n    \"envelope_xdr\": \"AAAAAIyonCip/4Rbc4iC5/6/DIsQuFOzuHlwCH0OjQ8fqaiMAAAAZAAT38MAAAAHAAAAAAAAAAEAAAAWdGVzdCBhY2NvdW50IGZvciBNaWZvcwAAAAAAAQAAAAEAAAAAjKicKKn/hFtziILn/r8MixC4U7O4eXAIfQ6NDx+pqIwAAAAAAAAAAMbyMPLD8paRfdTrc3mYx5wN+0BTHSxMKMqGIi0+e2HoAAAAAAvrwgAAAAAAAAAAAR+pqIwAAABAOXesHeFUzU2pVhihs97L1YabbU/e2s1TPzuNqSwIENLHyCr1nCBE67Q4KdbWqNBTVXKI1RTh2BTbY/ntYY3qDw==\",\r\n    \"result_codes\": {\r\n      \"transaction\": \"tx_failed\",\r\n      \"operations\": [\r\n        \"op_already_exists\"\r\n      ]\r\n    },\r\n    \"result_xdr\": \"AAAAAAAAAGT/////AAAAAQAAAAAAAAAA/////AAAAAA=\"\r\n  }\r\n}\r\n```"}}