
    The People of the State of New York, Respondent, v Roberto Cancel, Appellant.
   — Appeal by the defendant from a judgment of the Supreme Court, Kings County (Rienzi, J.), rendered April 6, 1990, convicting him of criminal sale of a controlled substance in the third degree and criminal possession of a controlled substance in the third degree, upon a jury verdict, and imposing sentence.

Ordered that the judgment is affirmed.

The two arresting officers were parked in an unmarked vehicle at the intersection of Bushwick Avenue and Scholes Street at approximately 3:50 p.m. on July 25, 1989. They were assigned to serve as a back-up team for an undercover buy and bust operation which was to have been conducted several blocks away. Prior to instructing the undercover officer to set up the buy, the arresting officers, from their vantage point, observed the defendant transfer a glassine envelope, apparently containing narcotics, to one Carlos Batres in exchange for currency. The men were immediately arrested and searched. The police recovered $54 from the defendant’s pocket, one glassine envelope from Batres and twelve glassine envelopes which had been thrown to the ground. Chemical analysis of the substance contained in the glassine envelopes revealed it to be heroin.

The defense sought to call the undercover officer as a witness on the ground that this witness’s testimony regarding the timing of events surrounding the arrest might be at variance with the testimony of the arresting officers. The trial court denied the defendant’s request, finding that the testimony of the undercover officer, who was not present at the arrest, was collateral to the defendant’s guilt or innocence, would serve to confuse the jury and could jeopardize the safety and effectiveness of the undercover officer.

This court has held that "[t]he testimony of a defendant’s witness should never be prospectively excluded as irrelevant unless his or her offer of proof reveals that the evidence is offered in palpable bad faith” (People v Rouff, 163 AD2d 338, 339). Although the record does not reveal that the evidence sought to be introduced by the defendant was offered "in palapable bad faith”, it was clearly collateral to the ultimate issue of the defendant’s guilt and bore only on the arresting officers’ credibility. As such, the admissibility of that evidence was a matter of discretion for the trial court (see, People v Duncan, 46 NY2d 74, cert denied 442 US 910; People v Thomas, 116 AD2d 678). Had the witness been allowed to take the stand, it would not have been an improvident exercise of discretion to refuse to admit the evidence in question. In light of the overwhelming evidence of the defendant’s guilt, the error in this regard was harmless beyond a reasonable doubt (see, People v Crimmins, 36 NY2d 230; see also, People v Daly, 98 AD2d 803, affd 64 NY2d 970). Mangano, P. J., Kunzeman, Miller and Copertino, JJ., concur.  