If a player transfers resources to you while you are in the menu for transferring resources/units between your army and city, it will attempt to send the resources to your army. If you cannot hold it, the entire amount of resources sent will be lost.
This may also occur when interacting army to army, I have not tested this.
Resources lost while discovering this bug have already been replaced by RsShadow.
To make sure everyone understands to which screen I'm referring I've linked a screenshot displaying what I mean.