As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
SJU INFLIGHT T618/03APR SDQ TO JFK - AFTER TAKEOFF UNABLE TO RETRACT MAIN LANDING GEAR. LANDED SJU WITHOUT INCIDENT. FOUND LOOSE CONNECTORS FOR RIGHT MAIN GEAR SYSTEM ONE AND TWO BOGIE BEAM SENSORS. CLEANED AND RECONNECTED BOTH CONNECTORS. SYSTEM GROUND CHECKED NORMAL OPERATION.