make err.type enumerable