Endoscopic retrograde cholangiopancreatography (ERCP) continues to be one of the most complex gastrointestinal procedures and carries the highest risk of complications. Optimizing the outcome of ERCP requires a fine balance between the risk and the benefit of every maneuver performed. This fine balance has to include an analysis of the indication for the procedure, the optimal timing, the setting where the procedure is performed, the endoscopist and staff training and expertise, availability of surgical and interventional radiology support, the risk of every maneuver and ways to minimize this risk. As in any other procedure, it is very important to know one’s limitations and have a plan for failed procedures including consulting a colleague or referring the patient to a center with more expertise. In addition, a process of quality improvement is integral to every endoscopy center to address areas of underperformance, improve patient care and decrease liability.