It says on the Attack on Titan wiki page about Titan Shifters that:
According to Rod Reiss, a shifter's power rests in their spinal cord, meaning that to gain the Titan powers, it is not necessary to eat the entire shifter, more so just biting through the spine and ingesting their spinal fluid. Analysis of a serum recovered from Rod Reiss has also revealed that the Titan serums, which is actually Titan spinal fluid,appear to contain ingredients based on human spinal fluid. However, it is difficult to study, because once the liquid makes contact with the air, it evaporates just like Titan corpses do.
It can be seen during the 5th episode of the anime
that when Eren is firstly bitten, his spine is not damaged.
Shortly after, he saves Armin, then the Titan bites his arm off and then swallows without chewing him. This means that he got in the Titan's stomach without any damage to his spine, keeping his powers from being taken.
He then transforms and breaks free, from here being no need for me to continue with the story of how he escapes and goes berserk.
Moreover, when Armin eats Bertolt it happens like this:
It can be seen that Bertolt is bitten in a way in which his spine will be cracked open so his powers will be passed to Armin.
To sum up:
- Eren survives during the Battle of the Trost because he keeps his powers and transforms fast enough to not be crystallized and regurgitated by the Titan.
- He keeps his powers because his spine was not damaged.
- Armin gained his powers by eating Bertolt's spine, as showed above.
- Based on the previous information, these events were not an oversight from the author.