projectdiscovery/nuclei · error
"Invalid network type: " + valueToMap
Error message
"Invalid network type: " + valueToMap
What it means
Error ""Invalid network type: " + valueToMap" thrown in projectdiscovery/nuclei.
Source
Thrown at pkg/protocols/network/network_input_types.go:45
}
// GetSupportedNetworkInputTypes returns list of supported types
func GetSupportedNetworkInputTypes() []NetworkInputType {
var result []NetworkInputType
for index := NetworkInputType(1); index < limit; index++ {
result = append(result, index)
}
return result
}
func toNetworkInputTypes(valueToMap string) (NetworkInputType, error) {
normalizedValue := normalizeValue(valueToMap)
for key, currentValue := range NetworkInputMapping {
if normalizedValue == currentValue {
return key, nil
}
}
return -1, errors.New("Invalid network type: " + valueToMap)
}
func normalizeValue(value string) string {
return strings.TrimSpace(strings.ToLower(value))
}
func (t NetworkInputType) String() string {
return NetworkInputMapping[t]
}
// NetworkInputTypeHolder is used to hold internal type of the Network type
type NetworkInputTypeHolder struct {
NetworkInputType NetworkInputType `mapping:"true"`
}
func (holder NetworkInputTypeHolder) GetType() NetworkInputType {
return holder.NetworkInputType
}View on GitHub (pinned to 265b3a3dec)
When it happens
Trigger: Thrown at pkg/protocols/network/network_input_types.go:45 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/fca9f2b86134c51e.
Report an issue: GitHub.