A federal appeals court held that a district judge was wrong to rule on a motion to dismiss before considering whether the dispute had to be resolved through arbitration.

The U.S. Court of Appeals for the Third Circuit said U.S. District Judge A. Richard Caputo of the Middle District of Pennsylvania skipped a step by ruling on a motion to dismiss the lawsuit before handling the defendant’s request to compel arbitration.