Less broken error_type detection