Comments (10)
Where does ACCOUNT_MERGE_HAS_SUB_ENTRIES
get converted to op_has_sub_entries
? I think its important that we actually have the actually opcode listed so people can google for it.
from docs.
As you point out @rice2000, the new docs have the Horizon errors and the mapping to XDR opcodes. I think this is sufficient for the docs issue. I'll open an issue on Horizon to discuss whether to make the breaking change to move to explicit opcodes in a future version of the API.
from docs.
Looks similar to #179 which was closed but I don't think it was solved
from docs.
For reference the codes can be found in codes
package. I think that primary reason for this was to merge similar error codes into one, ex. all different operation success codes are now op_success
. But you are right we should either update the docs or display original errors returned by stellar-core in Horizon response.
from docs.
I don't really see the value in merging the similar codes into a smaller number of generic codes. Whether generic or not the caller probably needs to track the context of what was sent, to choose an appropriate specific follow-up action to the error (e.g. retry vs abort). Also the original stellar core errors reflect the underlying XDR, and I think abstracting this here doesn't aid comprehension.
Documentation for this (and other Horizon validation checks) should be clearly linked in the returned error. We do have a decent doc page here so I think the issue is making sure we link to it.tx_bad_auth
is slightly different though. This is an error at the transaction level, because Horizon validated your TX and concluded it would never work (due to bad/missing signature and/or bad network passphase).
So:
- We should fix the docs to link to the Horizon errors (probably at the top of list of operations)
- Overall I think I'm in favour of changing the codes to be explicit. This would be a pretty major breaking change. @TomQ @tomerweller @rice2000 what are your thoughts?
Update: I hadn't internalised that tx_bad_auth
is actually a protocol level error. Thanks for pointing that out @tomerweller.
from docs.
from docs.
I agree with @ire-and-curses. The return codes are well defined and documented in the transactions xdr definitions (txBAD_AUTH example). Abstracting over these is causing us unnecessary pain.
We can import these error comments to the horizon documentation and even use them to generate human readable error messages in the response from a failed transaction submission.
from docs.
Regarding it being a breaking change, if that's too much to handle we can add the real opcodes in addition.
I also have a bug filed in js-sdk to surface these errors via the sdk, and if we implement that we could change this behavior under the covers to not break anything.
stellar/js-stellar-sdk#413
from docs.
Main offender: https://github.com/stellar/go/blob/8affeed3c57d334f7a5e47099007259b80fccb75/services/horizon/internal/codes/main.go#L38
from docs.
It looks like this situation has been improved by the API Reference
section of the new docs here: https://developers.stellar.org/api/errors/result-codes/
Is that sufficient to solve this issue?
from docs.
Related Issues (20)
- Define testnet best practice of merging XLM back to Friendbot's account HOT 1
- A lot of dead links on the developer guide HOT 2
- Make it more clear around detecting transfers via Horizon Effects
- Anchor guide page is out of date HOT 2
- Add more recommended hosting providers with good prices HOT 2
- Add PathPaymentStrictSend to list of operations HOT 1
- Update Go example code in Getting Started guide HOT 3
- JS Streaming example needs memo HOT 1
- Consider adding a LICENSE file to this repo HOT 1
- Incorrect command for generating keys in example config HOT 2
- core example file is outdated HOT 1
- [Crowdfunding example] Is it possible to presign a manage buy offer without a concrete amount? HOT 1
- connect-to-wallets links to deprecated methods (e.g. SEPs 6 & 12) HOT 1
- Stellar-core docs provide example of quorum which does not pass isQuorumSetSane() check HOT 3
- Add information about cache HTTP headers required for history archives HOT 3
- Feature Request: more detailed documentation for `limit` argument HOT 2
- Node stopped syncing with Stellar HOT 3
- Can't complete Stellar.toml HOT 1
- Add deprecation notice to README in this repo and point users to the repo for new docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.