Skip to content

Commit

Permalink
filter secret from err output (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
kat-statsig authored Jun 26, 2024
1 parent d64278c commit 954c724
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion error_boundary.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package statsig
import (
"bytes"
"encoding/json"
"errors"
"net/http"
"runtime"
"strconv"
"strings"
"sync"
"time"
)
Expand Down Expand Up @@ -146,7 +148,8 @@ func (e *errorBoundary) logExceptionWithOptions(exception error, options logExce
}

if options.LogToOutput {
Logger().LogError(exception)
filteredError := strings.Replace(exceptionString, e.sdkKey, "******", -1)
Logger().LogError(errors.New(filteredError))
}
if !options.BypassDedupe && e.checkSeen(exceptionString) {
return
Expand Down

0 comments on commit 954c724

Please sign in to comment.