mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-14 00:47:21 +00:00
add missing inc error
This commit is contained in:
parent
f6236eefe3
commit
744c9f367c
1 changed files with 1 additions and 0 deletions
|
@ -105,6 +105,7 @@ func (h *defaultHandler) handleNonArchiveContent(
|
|||
for data := range chunkReader(ctx, reader) {
|
||||
dataOrErr := DataOrErr{}
|
||||
if err := data.Error(); err != nil {
|
||||
h.metrics.incErrors()
|
||||
dataOrErr.Err = fmt.Errorf("%w: error reading chunk: %v", ErrProcessingWarning, err)
|
||||
if writeErr := common.CancellableWrite(ctx, dataOrErrChan, dataOrErr); writeErr != nil {
|
||||
return fmt.Errorf("%w: error writing to data channel: %v", ErrProcessingFatal, writeErr)
|
||||
|
|
Loading…
Reference in a new issue