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

GET /slp/txDetails/{txid} return traceback data #521

Open
dtokens opened this issue Nov 4, 2019 · 3 comments
Open

GET /slp/txDetails/{txid} return traceback data #521

dtokens opened this issue Nov 4, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@dtokens
Copy link

dtokens commented Nov 4, 2019

Call /slp/txDetails/d70af8576a059b24d831450ea9e4f6c192089212fc7469e3a51d2a771362e5d8 returns traceback data:

{
  "error": "TypeError: Cannot read property 'in' of undefined\n    at 
/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:1924:34\n    at step 
(/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:43:23)\n    at Object.next 
(/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:24:53)\n    at 
/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:18:71\n    at new Promise 
(<anonymous>)\n    at __awaiter 
(/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:14:12)\n    at formatToRestObject 
(/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:1917:12)\n    at 
/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:1844:42\n    at step 
(/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:43:23)\n    at Object.next 
(/var/www/rest.bitcoin.com/dist/routes/v2/slp.js:24:53)"

}
@christroutner christroutner added Low Priority No decisive action will be taken. Issue left open for discussion purposes. Needs Investigation Further investigation required labels Nov 15, 2019
@christroutner
Copy link

This issue needs further investigation:

  • Clear steps on how to reproduce this issue
  • What is the expected result?
  • How is the actual result different than the expectation?

@christroutner
Copy link

The reason the traceback error message is displayed is because the TXID is not an SLP transaction.

Here is the endpoint which re-creates this issue:
https://rest.bitcoin.com/v2/slp/txDetails/d70af8576a059b24d831450ea9e4f6c192089212fc7469e3a51d2a771362e5d8

Here on the block explorer you can see that this is not an SLP transaction:
https://explorer.bitcoin.com/bch/tx/d70af8576a059b24d831450ea9e4f6c192089212fc7469e3a51d2a771362e5d8

@christroutner
Copy link

The scope of this issue is update the /v2/slp/txDetails/ endpoint to return an error message like 'not an slp transaction' in this scenario. Any PR fixing this issue should include unit and integration tests for this use case.

@christroutner christroutner added enhancement New feature or request and removed Low Priority No decisive action will be taken. Issue left open for discussion purposes. Needs Investigation Further investigation required labels Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants