peatio icon indicating copy to clipboard operation
peatio copied to clipboard

API - Orders, when there are insufficient funds in the wallet, a wrong error message appears

Open TasyaBykova opened this issue 8 years ago • 2 comments

Steps to reproduce: Create a post call to the attached url with any coin you do not have the funds to buy for example in [email protected] / 12346578 , ethusd.

Error: "error":

{ "code": 2002, "message": "Failed to create order. Reason: cannot lock funds (amount: 0.0004)" }

Actual result: the error text is incorrect, see screenshot

image

Expected result: a more accurate error should appear:

"Order rejection. Insufficient funds in the account. Please deposit more funds by clicking here or decrease the order quantity. The word *here *should be a link to the deposit page"

TasyaBykova avatar May 11 '18 08:05 TasyaBykova

@TasyaBykova This is Peatio API endpoint. Thing of Peatio like microservice. It will never include any human readable information. This should be implemented in AppLogic. We recently removed reason from error text because it exposes important information about Peatio which is security problem. Please, don't submit issues like these. We are looking to make Peatio bug-free, not include cool human-readable messages.

yivo avatar May 11 '18 10:05 yivo

Also Peatio known nothing about frontend and AppLogic. So I believe you vision is not correct.

yivo avatar May 11 '18 10:05 yivo