OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / api / errors.go
index aa89c35..7c5debd 100644 (file)
@@ -59,17 +59,18 @@ var respErrFormatter = map[error]httperror.Info{
        account.ErrInsufficient:         {400, "BTM700", "Funds of account are insufficient"},
        account.ErrImmature:             {400, "BTM701", "Available funds of account are immature"},
        account.ErrReserved:             {400, "BTM702", "Available UTXOs of account have been reserved"},
-       account.ErrMatchUTXO:            {400, "BTM703", "Not found UTXO with given hash"},
+       account.ErrMatchUTXO:            {400, "BTM703", "UTXO with given hash not found"},
        ErrBadActionType:                {400, "BTM704", "Invalid action type"},
        ErrBadAction:                    {400, "BTM705", "Invalid action object"},
        ErrBadActionConstruction:        {400, "BTM706", "Invalid action construction"},
        txbuilder.ErrMissingFields:      {400, "BTM707", "One or more fields are missing"},
        txbuilder.ErrBadAmount:          {400, "BTM708", "Invalid asset amount"},
-       account.ErrFindAccount:          {400, "BTM709", "Not found account"},
-       asset.ErrFindAsset:              {400, "BTM710", "Not found asset"},
+       account.ErrFindAccount:          {400, "BTM709", "Account not found"},
+       asset.ErrFindAsset:              {400, "BTM710", "Asset not found"},
        txbuilder.ErrBadContractArgType: {400, "BTM711", "Invalid contract argument type"},
-       txbuilder.ErrOrphanTx:           {400, "BTM712", "Not found transaction input utxo"},
-       txbuilder.ErrExtTxFee:           {400, "BTM713", "Transaction fee exceed max limit"},
+       txbuilder.ErrOrphanTx:           {400, "BTM712", "Transaction input UTXO not found"},
+       txbuilder.ErrExtTxFee:           {400, "BTM713", "Transaction fee exceeded max limit"},
+       txbuilder.ErrNoGasInput:         {400, "BTM714", "Transaction has no gas input"},
 
        // Submit transaction error namespace (73x ~ 79x)
        // Validation error (73x ~ 75x)