As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
MIA - FLT 1791 - AFTER TAKEOFF MIA WITH LANDING GEAR RETRACTED, RIGHT MAIN LANDING GEAR DOOR LIGHT ILLUMINATED. AIRCRAFT RETURNED TO MIA AND LANDED WITHOUT INCIDENT. ADJUSTED RIGHT MAIN LANDING GEAR DOOR SWITCH. OPERATED DOOR AND SYSTEM GROUND CHECKED NORMAL OPERATION. AIRCRAFT REDEPARTED MIA. (M)