Group errors by error type.