diff options
Diffstat (limited to 'src/include/taler_error_codes.h')
-rw-r--r-- | src/include/taler_error_codes.h | 99 |
1 files changed, 33 insertions, 66 deletions
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h index 4c3eea790..dd723c998 100644 --- a/src/include/taler_error_codes.h +++ b/src/include/taler_error_codes.h | |||
@@ -13,6 +13,7 @@ | |||
13 | You should have received a copy of the GNU General Public License along with | 13 | You should have received a copy of the GNU General Public License along with |
14 | TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> | 14 | TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> |
15 | */ | 15 | */ |
16 | |||
16 | /** | 17 | /** |
17 | * @file taler_error_codes.h | 18 | * @file taler_error_codes.h |
18 | * @brief error codes returned by GNU Taler | 19 | * @brief error codes returned by GNU Taler |
@@ -1681,104 +1682,70 @@ enum TALER_ErrorCode | |||
1681 | 1682 | ||
1682 | /* *************** Taler BANK/FAKEBANK error codes *************** */ | 1683 | /* *************** Taler BANK/FAKEBANK error codes *************** */ |
1683 | 1684 | ||
1684 | |||
1685 | /** | ||
1686 | * Negative number was used (as value and/or fraction) to initiate | ||
1687 | * a Amount object. | ||
1688 | */ | ||
1689 | TALER_EC_BANK_NEGATIVE_NUMBER_AMOUNT = 5400, | ||
1690 | |||
1691 | /** | ||
1692 | * A number too big was used (as value and/or fraction) to initiate | ||
1693 | * a amount object. | ||
1694 | */ | ||
1695 | TALER_EC_BANK_NUMBER_TOO_BIG = 5401, | ||
1696 | |||
1697 | /** | 1685 | /** |
1698 | * The request cannot be served because the client failed to | 1686 | * Wire tranfer attempted with credit and debit party being |
1699 | * login. To be returned along HTTP 401 Unauthorized. | 1687 | * the same bank account. |
1700 | */ | 1688 | */ |
1701 | TALER_EC_BANK_REJECT_LOGIN_FAILED = 5312, | 1689 | TALER_EC_BANK_SAME_ACCOUNT = 5102, |
1702 | 1690 | ||
1703 | /** | 1691 | /** |
1704 | * The transaction cannot be rejected becasue it does not exist | 1692 | * Wire transfer impossible, due to financial limitation of |
1705 | * at the bank. To be returned along HTTP 404 Not Found. | 1693 | * the party that attempted the payment. |
1706 | */ | 1694 | */ |
1707 | TALER_EC_BANK_REJECT_TRANSACTION_NOT_FOUND = 5301, | 1695 | TALER_EC_BANK_UNALLOWED_DEBIT = 5103, |
1708 | 1696 | ||
1709 | /** | 1697 | /** |
1710 | * The client does not own the account credited by the transaction | 1698 | * Arithmetic operation between two amounts of different |
1711 | * which is to be rejected, so it has no rights do reject it. To be | 1699 | * currency was attempted. |
1712 | * returned along HTTP 403 Forbidden. | ||
1713 | */ | 1700 | */ |
1714 | TALER_EC_BANK_REJECT_NO_RIGHTS = 5313, | 1701 | TALER_EC_BANK_CURRENCY_MISMATCH = 5104, |
1715 | 1702 | ||
1716 | /** | 1703 | /** |
1717 | * The POSTed JSON at /reject was invalid. To be returned along | 1704 | * At least one GET parameter was either missing or invalid for |
1718 | * HTTP 400 Bad Request. | 1705 | * the requested operation. |
1719 | */ | 1706 | */ |
1720 | TALER_EC_BANK_REJECT_JSON_INVALID = 5306, | 1707 | TALER_EC_BANK_PARAMETER_MISSING_OR_INVALID = 5105, |
1721 | 1708 | ||
1722 | /** | 1709 | /** |
1723 | * A URL parameter for /history was missing. To be returned along | 1710 | * JSON body sent was invalid for the requested operation. |
1724 | * HTTP 400 Bad Request. | ||
1725 | */ | 1711 | */ |
1726 | TALER_EC_BANK_HISTORY_PARAMETER_MISSING = 5208, | 1712 | TALER_EC_BANK_JSON_INVALID = 5106, |
1727 | 1713 | ||
1728 | /** | 1714 | /** |
1729 | * A URL parameter for /history was malformed. To be returned along | 1715 | * Negative number was used (as value and/or fraction) to initiate |
1730 | * HTTP 400 Bad Request. | 1716 | * a Amount object. |
1731 | */ | ||
1732 | TALER_EC_BANK_HISTORY_PARAMETER_MALFORMED = 5209, | ||
1733 | |||
1734 | /** | ||
1735 | * The client failed to login for /history. To be returned along | ||
1736 | * HTTP 401 Unauthorized. | ||
1737 | */ | ||
1738 | TALER_EC_BANK_HISTORY_LOGIN_FAILED = 5212, | ||
1739 | |||
1740 | /** | ||
1741 | * The bank had trouble obtaining a valid HTTP response. To be returned | ||
1742 | * along status code 0. | ||
1743 | */ | ||
1744 | TALER_EC_BANK_HISTORY_HTTP_FAILURE = 5213, | ||
1745 | |||
1746 | /** | ||
1747 | * The debit account for /admin/add/incoming is not known to the | ||
1748 | * bank. To be returned along HTTP 404 Not Found. | ||
1749 | */ | 1717 | */ |
1750 | TALER_EC_BANK_ADD_INCOMING_UNKNOWN_ACCOUNT = 5100, | 1718 | TALER_EC_BANK_NEGATIVE_NUMBER_AMOUNT = 5107, |
1751 | 1719 | ||
1752 | /** | 1720 | /** |
1753 | * The client specified the same bank account for both the credit | 1721 | * A number too big was used (as value and/or fraction) to initiate |
1754 | * and the debit account. The bank will not accomplish this operation. | 1722 | * a amount object. |
1755 | * To be returned along HTTP 403 Forbidden. | ||
1756 | */ | 1723 | */ |
1757 | TALER_EC_BANK_ADD_INCOMING_SAME_ACCOUNT = 5102, | 1724 | TALER_EC_BANK_NUMBER_TOO_BIG = 5108, |
1758 | 1725 | ||
1759 | /** | 1726 | /** |
1760 | * The operation would put the client in a debit situation which is | 1727 | * Could not login for the requested operation. |
1761 | * forbidden to them. To return along HTTP 403 Forbidden. | ||
1762 | */ | 1728 | */ |
1763 | TALER_EC_BANK_ADD_INCOMING_UNALLOWED_DEBIT = 5103, | 1729 | TALER_EC_BANK_LOGIN_FAILED = 5109, |
1764 | 1730 | ||
1765 | /** | 1731 | /** |
1766 | * The client POSTed an invalid JSON. To be returned along HTTP | 1732 | * The bank account referenced in the requested operation |
1767 | * 400 Bad Request. | 1733 | * was not found. Returned along "400 Not found". |
1768 | */ | 1734 | */ |
1769 | TALER_EC_BANK_ADD_INCOMING_JSON_INVALID = 5106, | 1735 | TALER_EC_BANK_UNKNOWN_ACCOUNT = 5110, |
1770 | 1736 | ||
1771 | /** | 1737 | /** |
1772 | * The client tried a /admin/add/incoming request by using | 1738 | * The transaction referenced in the requested operation (typically |
1773 | * a currency different from the one the bank operates with. | 1739 | * a reject operation), was not found. |
1774 | */ | 1740 | */ |
1775 | TALER_EC_BANK_ADD_INCOMING_CURRENCY_MISMATCH = 5111, | 1741 | TALER_EC_BANK_TRANSACTION_NOT_FOUND = 5111, |
1776 | 1742 | ||
1777 | /** | 1743 | /** |
1778 | * The client failed to login for /admin/add/incoming. To be returned | 1744 | * The client does not own the account credited by the transaction |
1779 | * along HTTP 401 Unauthorized. | 1745 | * which is to be rejected, so it has no rights do reject it. To be |
1746 | * returned along HTTP 403 Forbidden. | ||
1780 | */ | 1747 | */ |
1781 | TALER_EC_BANK_ADD_INCOMING_LOGIN_FAILED = 5112, | 1748 | TALER_EC_BANK_REJECT_NO_RIGHTS = 5200, |
1782 | 1749 | ||
1783 | /** | 1750 | /** |
1784 | * End of error code range. | 1751 | * End of error code range. |