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

Improve friendbot status codes #2219

Closed
ddombrowsky opened this issue Feb 4, 2020 · 4 comments
Closed

Improve friendbot status codes #2219

ddombrowsky opened this issue Feb 4, 2020 · 4 comments

Comments

@ddombrowsky
Copy link

What version are you using?

None. I'm just using friendbot.

What did you do?

Attempting to fund test wallet GDPZRDTWIMY2ZQ2TSMKR3TD2KQI24GPYATMTCMW3Y6MNV5G5XVZNMOOP

The account is valid.
https://www.stellar.org/laboratory/#explorer?resource=accounts&endpoint=single&values=eyJhY2NvdW50X2lkIjoiR0RQWlJEVFdJTVkyWlEyVFNNS1IzVEQyS1FJMjRHUFlBVE1UQ01XM1k2TU5WNUc1WFZaTk1PT1AifQ%3D%3D&network=test

What did you expect to see?

Successful transfer of 10000 lumens. Funding of other accounts works fine.

What did you see instead?

Failed to fund GDPZRDTWIMY2ZQ2TSMKR3TD2KQI24GPYATMTCMW3Y6MNV5G5XVZNMOOP on the test network
{
  "type": "https://stellar.org/horizon-errors/server_error",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "An error occurred while processing this request.  This is usually due to a bug within the server software.  Trying this request again may succeed if the bug is transient, otherwise please report this issue to the issue tracker at: https://github.com/stellar/go/issues. Please include this response in your issue."
}
@ddombrowsky ddombrowsky added the bug Something isn't working label Feb 4, 2020
@ire-and-curses
Copy link
Member

I see lumens in the account you linked to. Friendbot doesn't "top-up" accounts that already exist - it creates new accounts. Having said that, this is not the best error message to get back.

@ddombrowsky
Copy link
Author

k. I didn't know it was for new accounts only.

@leighmcculloch
Copy link
Member

We should also change the 500 status code in this situation to maybe 409 given there's a conflict since the resource (account) already exists.

@ire-and-curses ire-and-curses added friendbot and removed bug Something isn't working labels Feb 5, 2020
@ire-and-curses
Copy link
Member

Next steps:

  • Return something other than 500 for this situation (409?)
  • Return an informative error, e.g. account already exists

@leighmcculloch leighmcculloch changed the title failed to fund test account Improve friendbot status codes Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants