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

Initial attempt at order error enum docs #2010

Merged
merged 5 commits into from
Jul 22, 2020

Conversation

edd
Copy link
Member

@edd edd commented Jul 21, 2020

This PR adds some documentation to the order error proto in order to improve the generated documentation.

Closes #2002

This PR adds some documentation to the order error proto in order to improve the documentation, so that we can point people at our API docs to figure out why an order they submitted ended up this way. There are two errors I don't yet understand so this isn't ready yet.
@edd edd added this to the Q2020Q21 milestone Jul 21, 2020
@edd edd added documentation Improvements or additions to documentation market-framework labels Jul 21, 2020
Copy link
Contributor

@peterbarrow peterbarrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ORDER_ERROR_TIME_FAILURE // Unable to get Vega (blockchain) time
ORDER_ERROR_REMOVAL_FAILURE // Failed to remove an order from the book
Amended instead of Ammended
ORDER_ERROR_AMEND_FAILURE // Amend failure because amend details do not match original order
ORDER_ERROR_NOT_FOUND // Order not found in the order book or in order store

@peterbarrow
Copy link
Contributor

ORDER_ERROR_EDIT_NOT_ALLOWED // This occurs when the client tries to amend a field that is not amendable (like order type, creation time etc)

@cdm
Copy link
Contributor

cdm commented Jul 21, 2020

Woo! You're doing some work for me here - thank you. I'm going to do a full review of the comments etc WRT auto-generated docs in the coming days. REF #1933 #1934 (and somewhat but its already good #1932)

@cdm
Copy link
Contributor

cdm commented Jul 21, 2020

Also specifically this task is related https://github.com/vegaprotocol/docs/issues/77

@edd
Copy link
Member Author

edd commented Jul 21, 2020

Nice! Be aware that it takes longer than you think to work out the reasons why some error codes are triggered - I thought I could bash this out in 20 minutes, but it's probably been an hour + 20 minutes of Pete's time, and I'm not even sure that they're right. But they're definitely better than nothing.

Add @peterbarrow's descriptions for:
- Add edit not allowed description
- Add time failure description
- Add amend failure description
- Add not found error description
proto/vega.proto Show resolved Hide resolved
@edd
Copy link
Member Author

edd commented Jul 21, 2020

Thanks @peterbarrow, I've merged all yours in to the PR. I still have to regenerate the gubbins so I'll mark this as draft until I have.

@edd edd marked this pull request as draft July 21, 2020 16:20
proto/vega.proto Show resolved Hide resolved
edd and others added 3 commits July 21, 2020 17:35
- Update ORDER_ERROR_EDIT_NOT_ALLOWED description not to use the term ‘edited’
Multiple times

- Ammended -> Amend
@vega-ci-bot
Copy link
Collaborator

system-tests failed.

=== Test summary ===
../../grpcTesting/accounts/accountsTests.py .                            [100%]
../../grpcTesting/devnet/sanityTests.py ......                           [100%]
../../grpcTesting/governance/newAssetTests.py .                          [100%]
../../grpcTesting/governance/newMarketGovTests.py EEEEEEEEEEEEEEEEEEEEEx [ 47%]
EEEEEEEEEEEEEEEEEEEEEEEE                                                 [100%]
 ERROR at setup of testVoteNDecline 
 ERROR at setup of testVoteYEnactedFail 
 ERROR at setup of testVoteYNProposalDraw 
 ERROR at setup of testVoteYYNProposalPass 
 ERROR at setup of testNewMarketRejectNoStake 
 ERROR at setup of testNewMarketValidProposal 
 ERROR at setup of testGetAllProposals 
 ERROR at setup of testGetAllOfTheProposals[6] 
 ERROR at setup of testGetNewMarketProposals[6] 
 ERROR at setup of testGetAllOfTheProposals[2] 
 ERROR at setup of testGetNewMarketProposals[2] 
 ERROR at setup of testGetAllOfTheProposals[5] 
 ERROR at setup of testGetNewMarketProposals[5] 
 ERROR at setup of testGetAllOfTheProposals[4] 
 ERROR at setup of testGetNewMarketProposals[4] 
 ERROR at setup of testGetAllOfTheProposals[3] 
 ERROR at setup of testGetNewMarketProposals[3] 
 ERROR at setup of testGetProposalsByParty 
 ERROR at setup of testGetRejectedProposalsByParty 
 ERROR at setup of testGetOpenProposalsByParty 
 ERROR at setup of testGetVotesByParty 
 ERROR at setup of testNewMarketOpenSingleTok 
 ERROR at setup of testVoteYSmallHolder 
 ERROR at setup of testVoteYMediumNSmallHolder 
 ERROR at setup of testVoteTopUpSmallDuringVote 
 ERROR at setup of testVoteYNNoFundsProposal 
 ERROR at setup of testNewMarketInvalidParty 
 ERROR at setup of testInvalidEnactTime 
 ERROR at setup of testVoteYOwnOpenProposal 
 ERROR at setup of testVoteYOpenProposal 
 ERROR at setup of testVoteNOpenProposal 
 ERROR at setup of testVoteNoStakeOpenProposal 
 ERROR at setup of testVoteNoStakeAddFunds 
 ERROR at setup of testVoteRejectProposal 
 ERROR at setup of testVotePassedProposal 
 ERROR at setup of testVoteBothYNOpen 
 ERROR at setup of testVoteTwiceYSameUser 
 ERROR at setup of testVoteInvalidProposalID 
 ERROR at setup of testVoteEnactedMarket 
 ERROR at setup of testVoteDeclinedMarket 
 ERROR at setup of testVoteYTaintedKey 
 ERROR at setup of testNewMarketClosedProposal 
 ERROR at setup of testSubmitEnactedGTCOrder 
 ERROR at setup of testSubmitUnEnactedMarketGTCOrder 
 ERROR at setup of testFiftyYesVoteProposal 
../../grpcTesting/governance/newMarketTradesTests.py EEEEEEEEEEEE        [100%]
 ERROR at setup of testTradeGTCToGTC 
 ERROR at setup of testTradeGTTToGTT 
 ERROR at setup of testTradeGTCToIOC 
 ERROR at setup of testTradeGTCToFOK 
 ERROR at setup of testTradesByParty 
 ERROR at setup of testPositionsByParty 
 ERROR at setup of testCloseOutTraderBuyOrders 
 ERROR at setup of testCloseOutTraderSellOrders 
 ERROR at setup of testTradesByMarket 
 ERROR at setup of testTradeGTTToIOC 
 ERROR at setup of testTradeGTTToFOK 
 ERROR at setup of testNoTradeGTCToStopped 
../../grpcTesting/margins/marginsTests.py .                              [100%]
../../grpcTesting/markets/marketsTests.py ..............                 [100%]
../../grpcTesting/orders/amendOrdersTests.py ........................... [ 87%]
....                                                                     [100%]
../../grpcTesting/orders/cancelOrdersTests.py .......................    [100%]
../../grpcTesting/orders/generalOrdersTests.py .F...                     [100%]
 testActiveOrdersByMarket 
../../grpcTesting/orders/limitOrdersTests.py ...........                 [100%]
../../grpcTesting/orders/marketOrdersTests.py ........                   [100%]
../../grpcTesting/orders/mixedOrdersTests.py .....................       [100%]
../../grpcTesting/orders/negativeOrdersTests.py ........................ [ 57%]
....x.........s...                                                       [100%]
../../grpcTesting/parallel/submitParallelOrdersTests.py ........         [100%]
../../grpcTesting/parties/partiesTests.py ..                             [100%]
../../grpcTesting/trading/positionsTests.py ..                           [100%]
../../grpcTesting/trading/tradesTests.py ............                    [100%]
../../grpcTesting/wallet/walletTests.py ................................ [ 76%]
..........                                                               [100%]
../../rest/orders/negativeOrdersTests.py .                               [100%]

@edd edd marked this pull request as ready for review July 21, 2020 19:24
@jeremyletang jeremyletang merged commit 9c9c037 into develop Jul 22, 2020
@edd edd mentioned this pull request Aug 10, 2020
12 tasks
@ashleyvega ashleyvega deleted the docs/2002-improve-order-error-docs branch November 5, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation markets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain order rejections for api docs
6 participants