hyle-team / zano

Confidential, Secure, Easy-to-Use
https://zano.org
Other
106 stars 59 forks source link

[testnet] Missed error details #368

Open Andreevsky opened 1 year ago

Andreevsky commented 1 year ago

testnet-v1.5.0.144[0c0c287]

  1. Try to send transaction with amount higher than available coins at wallet.
  2. Transaction failed with error, but error is not specified. Expected "Insuficcient funds in account"
  3. Also different error cases for failed transactions not specified at error message.
  4. That functionality was at previeus versions of Zano.

https://user-images.githubusercontent.com/16042035/211401937-1e386a23-e843-4af7-a15a-3adaa0ece591.mp4

NazarUsov commented 1 year ago

@cryptozoidberg What other errors can I handle? except NOT_ENOUGH_MONEY

cryptozoidberg commented 1 year ago

@cryptozoidberg What other errors can I handle? except NOT_ENOUGH_MONEY

@NazarUsov here you can see all possible return codes: (located in src/common/error_codes.h)

define API_RETURN_CODE_OK BASIC_RESPONSE_STATUS_OK

define API_RETURN_CODE_FAIL BASIC_RESPONSE_STATUS_FAILED

define API_RETURN_CODE_NOT_FOUND BASIC_RESPONSE_STATUS_NOT_FOUND

define API_RETURN_CODE_ACCESS_DENIED "ACCESS_DENIED"

define API_RETURN_CODE_INTERNAL_ERROR "INTERNAL_ERROR"

define API_RETURN_CODE_NOT_ENOUGH_MONEY "NOT_ENOUGH_MONEY"

define API_RETURN_CODE_NOT_ENOUGH_OUTPUTS_FOR_MIXING "NOT_ENOUGH_OUTPUTS_FOR_MIXING"

define API_RETURN_CODE_INTERNAL_ERROR_QUE_FULL "INTERNAL_ERROR_QUE_FULL"

define API_RETURN_CODE_BAD_ARG "BAD_ARG"

define API_RETURN_CODE_BAD_ARG_EMPTY_DESTINATIONS "BAD_ARG_EMPTY_DESTINATIONS"

define API_RETURN_CODE_BAD_ARG_WRONG_FEE "BAD_ARG_WRONG_FEE"

define API_RETURN_CODE_BAD_ARG_INVALID_ADDRESS "BAD_ARG_INVALID_ADDRESS"

define API_RETURN_CODE_BAD_ARG_WRONG_AMOUNT "BAD_ARG_WRONG_AMOUNT"

define API_RETURN_CODE_BAD_ARG_WRONG_PAYMENT_ID "BAD_ARG_WRONG_PAYMENT_ID"

define API_RETURN_CODE_WRONG_PASSWORD "WRONG_PASSWORD"

define API_RETURN_CODE_WALLET_WRONG_ID "WALLET_WRONG_ID"

define API_RETURN_CODE_WALLET_WATCH_ONLY_NOT_SUPPORTED "WALLET_WATCH_ONLY_NOT_SUPPORTED"

define API_RETURN_CODE_WALLET_AUDITABLE_NOT_SUPPORTED "WALLET_AUDITABLE_NOT_SUPPORTED"

define API_RETURN_CODE_FILE_NOT_FOUND "FILE_NOT_FOUND"

define API_RETURN_CODE_ALREADY_EXISTS "ALREADY_EXISTS"

define API_RETURN_CODE_CANCELED "CANCELED"

define API_RETURN_CODE_FILE_RESTORED "FILE_RESTORED"

define API_RETURN_CODE_TRUE "TRUE"

define API_RETURN_CODE_FALSE "FALSE"

define API_RETURN_CODE_CORE_BUSY "CORE_BUSY"

define API_RETURN_CODE_OVERFLOW "OVERFLOW"

define API_RETURN_CODE_BUSY "BUSY"

define API_RETURN_CODE_INVALID_FILE "INVALID_FILE"

define API_RETURN_CODE_WRONG_SEED "WRONG_SEED"

define API_RETURN_CODE_GENESIS_MISMATCH "GENESIS_MISMATCH"

define API_RETURN_CODE_DISCONNECTED "DISCONNECTED"

define API_RETURN_CODE_UNINITIALIZED "UNINITIALIZED"

define API_RETURN_CODE_TX_IS_TOO_BIG "TX_IS_TOO_BIG"

define API_RETURN_CODE_TX_REJECTED "TX_REJECTED"

define API_RETURN_CODE_HTLC_ORIGIN_HASH_MISSMATCHED "HTLC_ORIGIN_HASH_MISSMATCHED"

define API_RETURN_CODE_WRAP "WRAP"