Sort error codes and reduce noise with latencies