# Error Codes

List of all the Error Codes in Paladin's contracts :

| Code | Keyword                       |                                                                           |
| ---- | ----------------------------- | ------------------------------------------------------------------------- |
| 1    | CALLER\_NOT\_ADMIN            | The caller of the method must be the address listed as 'admin'            |
| 2    | FAIL\_TRANSFER                | Fail during an external ERC20 transfer                                    |
| 3    | FAIL\_TRANSFER\_FROM          | Fail during an external ERC20 transferFrom                                |
| 4    | BALANCE\_TOO\_LOW             | User palToken balance is too low                                          |
| 5    | ALLOWANCE\_TOO\_LOW           | User palToken allowance for the given spender is too low                  |
| 6    | SELF\_TRANSFER                | ERC20 self-transfer                                                       |
| 9    | INSUFFICIENT\_CASH            | Not enough underlying token in the PalPool                                |
| 10   | INSUFFICIENT\_BALANCE         | User underlying token balance is too low for the given amount             |
| 11   | FAIL\_DEPOSIT                 | Deposit function failed                                                   |
| 12   | FAIL\_LOAN\_INITIATE          | Initialization of a new PalLoan failed                                    |
| 13   | FAIL\_BORROW                  | Borrow function failed                                                    |
| 14   | LOAN\_CLOSED                  | Given PalLoan is already closed                                           |
| 15   | NOT\_LOAN\_OWNER              | User is not the owner of the given PalLoan                                |
| 16   | LOAN\_OWNER                   | User is owner of the given PalLoan (only used in KillBorrow context)      |
| 17   | FAIL\_LOAN\_EXPAND            | ExpandBorrow function failed                                              |
| 18   | NOT\_KILLABLE                 | PalLoan cannot be killed yet                                              |
| 19   | RESERVE\_FUNDS\_INSUFFICIENT  | Not enough funds set as Reserve (admin method)                            |
| 20   | FAIL\_MINT                    | Failed to mint the given palToken amount                                  |
| 21   | FAIL\_BURN                    | Failed to burn the given palToken amount                                  |
| 22   | ZERO\_ADDRESS                 | 0x00..00 address given as parameter                                       |
| 23   | BORROW\_INSUFFICIENT\_FEES    | Not enough fees to Borrow                                                 |
| 24   | FAIL\_WITHDRAW                | Withdraw function failed                                                  |
| 25   | FAIL\_CLOSE\_BORROW           | CloseBorrow function failed                                               |
| 26   | FAIL\_KILL\_BORROW            | KillBorrow function failed                                                |
| 27   | ZERO\_BORROW                  | Not allowed to borrow a null amount of tokens                             |
| 28   | INVALID\_PARAMETERS           | New parameters given are invalid                                          |
| 29   | CALLER\_NOT\_CONTROLLER       | The caller of the method must be the address listed as 'controller'       |
| 30   | CALLER\_NOT\_ALLOWED\_POOL    | The caller of the method must be in the list of allowed PalPool addresses |
| 31   | CALLER\_NOT\_MINTER           | The caller of the method must be the address listed as 'minter'           |
| 32   | FAIL\_LOAN\_DELEGATEE\_CHANGE | ChangeBorrowDelegatee function failed                                     |
| 33   | FAIL\_LOAN\_TOKEN\_BURN       | Failed to burn a PalLoanToken                                             |
| 34   | FEES\_ACCRUED\_INSUFFICIENT   | Not enough funds set as Accrued Fees (admin method)                       |
| 35   | CALLER\_NOT\_IMPLEMENTATION   | The caller must be the pending Implementation                             |
| 36   | LIST\_SIZES\_NOT\_EQUAL       | Given pools & tokens list are not the same size                           |
| 37   | POOL\_LIST\_ALREADY\_SET      | Initial Pool list was already set                                         |
| 38   | POOL\_ALREADY\_LISTED         | Pool is already listed in the Controller                                  |
| 39   | POOL\_NOT\_LISTED             | Pool is not listed in the Controller                                      |
| 40   | CALLER\_NOT\_POOL             | Method caller must be a listed Pool                                       |
| 41   | REWARDS\_CASH\_TOO\_LOW       | Not enough RewardToken available for claim                                |
| 42   | FAIL\_BECOME\_IMPLEMENTATION  | Implementation update failed                                              |
| 43   | INSUFFICIENT\_DEPOSITED       | User staked amount is lower                                               |
| 44   | NOT\_CLAIMABLE                | PalLoan rewards are null or not claimable yet                             |
| 45   | LOCKED                        | Reentrancy error                                                          |
