diff --git a/integration/nwo/common/runner/runner.go b/integration/nwo/common/runner/runner.go index a93fe0780..a1e54f283 100644 --- a/integration/nwo/common/runner/runner.go +++ b/integration/nwo/common/runner/runner.go @@ -123,7 +123,7 @@ func (r *Runner) Run(sigChan <-chan os.Signal, ready chan<- struct{}) error { startCheckTimeout = time.After(startCheckDuration) } - detectStartCheck = allOutput.Detect(r.StartCheck) + detectStartCheck = allOutput.Detect("%s", r.StartCheck) for { select { diff --git a/platform/view/core/manager/context.go b/platform/view/core/manager/context.go index 89a7f3b78..c3b62a8d8 100644 --- a/platform/view/core/manager/context.go +++ b/platform/view/core/manager/context.go @@ -137,7 +137,7 @@ func runViewOn(v view.View, opts []view.RunViewOption, ctx localContext) (res in case error: err = errors.WithMessage(e, "caught panic") case string: - err = errors.Errorf(e) + err = errors.New(e) default: err = errors.Errorf("caught panic [%v]", e) } diff --git a/platform/view/services/comm/host/rest/websocket/streamreader.go b/platform/view/services/comm/host/rest/websocket/streamreader.go index 7187c11db..3c3108f21 100644 --- a/platform/view/services/comm/host/rest/websocket/streamreader.go +++ b/platform/view/services/comm/host/rest/websocket/streamreader.go @@ -52,7 +52,7 @@ func (r *delimitedReader) Read(p []byte) (int, error) { func readExpectedLength(p []byte) (int, error) { length, n := binary.Uvarint(p) if n <= 0 { - return 0, errors.Errorf("failed reading expected length [" + string(p) + "]") + return 0, errors.Errorf("failed reading expected length [%s]", string(p)) } logger.Debugf("Reading only size: %d + %d", length, len(p)) return int(length) + len(p), nil diff --git a/platform/view/services/db/driver/sql/postgres/errormapper.go b/platform/view/services/db/driver/sql/postgres/errormapper.go index cfefc5aa5..804bdaa12 100644 --- a/platform/view/services/db/driver/sql/postgres/errormapper.go +++ b/platform/view/services/db/driver/sql/postgres/errormapper.go @@ -25,9 +25,9 @@ func (m *errorMapper) WrapError(err error) error { switch pgErr.Code { case "23505": - return errors.Wrapf(driver.UniqueKeyViolation, err.Error()) + return errors.Wrapf(driver.UniqueKeyViolation, "%s", err) case "40P01": - return errors.Wrapf(driver.DeadlockDetected, err.Error()) + return errors.Wrapf(driver.DeadlockDetected, "%s", err) default: logger.Warnf("Unmapped postgres error with code [%s]", pgErr) return pgErr diff --git a/platform/view/services/db/driver/sql/sqlite/errormapper.go b/platform/view/services/db/driver/sql/sqlite/errormapper.go index 9a4a26e6d..c8013f0a7 100644 --- a/platform/view/services/db/driver/sql/sqlite/errormapper.go +++ b/platform/view/services/db/driver/sql/sqlite/errormapper.go @@ -18,7 +18,7 @@ func (m *errorMapper) WrapError(err error) error { if err, ok := err.(*sqlite.Error); ok { switch err.Code() { case 1555: - return errors.Wrapf(driver.UniqueKeyViolation, err.Error()) + return errors.Wrapf(driver.UniqueKeyViolation, "%s", err) default: logger.Warnf("Unmapped sqlite error with code [%d]", err.Code()) }