As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
IN CRUISE AT FL 220 RECEIVED A FLAP FAIL CAUTION MESSAGE QRH FOLLOWED DECLARED EMERGENCY, DIVERT TO DTW FROM LEX LANDED WITHOUT INCIDENT IN DTW. TROUBLESHOT FLAP SYSTEM IAW BOMBARDIER FAULT ISOLATION MANUAL (FIM) AND ACFT MX MANUAL (AMM) R&R RT BRAKE POSITION SENSING UNIT (BPSU) DUE TO WOULD NOT MAINTAIN RIG.