Update to route handler snippet to match new flow