Skip to content

Commit

Permalink
fix: include classification errors as debug rather than report errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Nov 21, 2022
1 parent f6780b2 commit 22df593
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/report/writer/detectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"io"
"log"

zerolog "github.com/rs/zerolog/log"

classsification "github.com/bearer/curio/pkg/classification"
classsificationschema "github.com/bearer/curio/pkg/classification/schema"

Expand Down Expand Up @@ -41,7 +43,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 22df593

Please sign in to comment.