Green’s Dictionary of Slang

rank n.1

[rank adj.1 (2)]

(US Und.) a failed crime, esp. when foiled by the authorities; thus in the rank, arrested, captured while committing a crime.

[US]E. Booth Stealing Through Life 281: The only chance of a rank is pushing in with that first guy.
[US]E. Anderson Thieves Like Us (1999) 34: The damnedest, smallest thing got him in a rank there.
[US]Goldin et al. DAUL 174/1: Rank, n. 1. An unsuccessful crime, especially one caused by interference during commission; a thwarting of plans.
[US]Ragen & Finston World’s Toughest Prison 814: rank – A poorly handled crime or job of work.