We consider ensembles of channel codes that are partitioned into bins, and focus on analysis of exact random coding error exponents associated with an optimum decoding of the index of the bin to which the transmitted codeword belongs. Two main conclusions arise from this analysis. First, for an independent random selection of codewords within a given type class, the random coding exponent of an optimal bin index decoding is given by the ordinary random coding exponent function, computed at the rate of the entire code, independently of the exponential rate of the size of the bin. Second, for this ensemble of codes, suboptimal bin index decoding, which is based on an ordinary maximum likelihood decoding, is as good as the optimal bin index decoding in terms of the random coding error exponent achieved. Finally, for the sake of completeness, we also outline how our analysis of exact random coding exponents extends to the hierarchical ensemble that correspond to superposition coding and optimal decoding, where for each bin, first, a cloud center is drawn at random, and then the codewords of this bin are drawn conditionally indepenently given the cloud center. For this ensemble, the two conclusions, mentioned above, no longer hold necessarily in general.