# ICRC2 handling transfer\_from() and expires\_at

**URL:** <https://forum.dfinity.org/t/icrc2-handling-transfer-from-and-expires-at/24626>\
**Category:** Developers\
**Tags:** Discussing\
**Created:** [November 13, 2023, 2:10am UTC](https://forum.dfinity.org/t/icrc2-handling-transfer-from-and-expires-at/24626 "2023-11-13T02:10:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayicp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kayicp/32/36679_2.png) [@kayicp](https://forum.dfinity.org/u/kayicp)\
**Post date:** [November 13, 2023, 2:10am UTC](https://forum.dfinity.org/t/icrc2-handling-transfer-from-and-expires-at/24626/1 "2023-11-13T02:10:31Z")

</div>

Hi how should the ledger handle the `icrc2_transfer_from` method if the `spender`’s `expires_at` was set and it’s before the current time (ie expired)?

i ask because on

> <https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-2/README.md>

the `expires_at` was only handled during `icrc2_approve` method with the possibility of `#Expired : { ledger_time : nat64 }` error.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/8/8c0a128db337a810a67c8dd92ac145249ff35631.png)

while `icrc2_transfer_from` does not have that error.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/e/e4fae378870b42aecbf713691d8c679e61bf4535.png)

should I handle it this way?

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/4d2021f18c73429a2624203d595adfef58f004eb.png)

---

<div class="post-metadata">

**Author:** ![roman-kashitsyn](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/roman-kashitsyn/32/3802_2.png) [@roman-kashitsyn](https://forum.dfinity.org/u/roman-kashitsyn)\
**Post date:** [November 13, 2023, 9:45am UTC](https://forum.dfinity.org/t/icrc2-handling-transfer-from-and-expires-at/24626/2 "2023-11-13T09:45:08Z")

</div>

When the approval expires, the ledger treats it as if it never existed (the DFINITY implementation actively prunes expired approvals from memory, for example). So the `icrc2_transfer_from` method should return the `InsufficientAllowance` error when the approval expires.

Also note that the `GenericError` variant is reserved for future refinements of the standard, not for the implementors to return custom errors.
