testing some error handling

This commit is contained in:
Hazel Noack
2025-10-07 14:51:38 +02:00
parent 49cc689a89
commit ee4d476b44
2 changed files with 30 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ func RegisterPlugin(plugin Plugin) error {
func compileSourceType(source data.Source) (data.Source, error) {
if source.SourceType != nil {
if _, ok := namePlugins[source.SourceType.Name]; !ok {
return source, errors.New("source type " + source.SourceType.Name + " not found")
}
return source, nil
}