Skip to content

Commit

Permalink
fix(classification): include classification errors as debug rather th…
Browse files Browse the repository at this point in the history
…an report errors (#146)

fix: include classification errors as debug rather than report errors
  • Loading branch information
elsapet committed Nov 21, 2022
1 parent 22b891c commit 7e097a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/report/writer/detectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

classification "github.com/bearer/curio/pkg/classification"
classificationschema "github.com/bearer/curio/pkg/classification/schema"
zerolog "github.com/rs/zerolog/log"

"github.com/bearer/curio/pkg/parser"
"github.com/bearer/curio/pkg/parser/nodeid"
Expand Down Expand Up @@ -41,7 +42,7 @@ func (report *Detectors) AddInterface(
detection := &detections.Detection{DetectorType: detectorType, Value: data, Source: source, Type: detections.TypeInterface}
classifiedDetection, err := report.Classifier.Interfaces.Classify(*detection)
if err != nil {
report.AddError(detection.Source.Filename, fmt.Errorf("classification interfaces error: %s", err))
zerolog.Debug().Msgf("classification interfaces error from %s: %s", detection.Source.Filename, err)
return
}

Expand Down

0 comments on commit 7e097a2

Please sign in to comment.