Before TSP error handling
Before TSP error handling