Skip to content

Commit

Permalink
fixed missing field in errorEncoder (#102)
Browse files Browse the repository at this point in the history
* fixed missing field in errorEncoder

* added in missing error key

Co-authored-by: Kristina Pathak <[email protected]>

* fixed vendoring

* prepped changelog for release

Co-authored-by: Kristina Pathak <[email protected]>
  • Loading branch information
mtrinh11 and kristinapathak authored Apr 26, 2022
1 parent 08cb18c commit d3db9b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]


## [v0.3.8]
- Added measures and providemetrics func to metrics.go. [#98](https://github.com/xmidt-org/ancla/pull/98)
- Fixed missing field in errorEncoder logging. [#102](https://github.com/xmidt-org/ancla/pull/102)

## [v0.3.7]
- Bumped argus to v0.8.0. [#97](https://github.com/xmidt-org/ancla/pull/97)
Expand Down Expand Up @@ -94,7 +98,8 @@ internalWebhooks. [#80](https://github.com/xmidt-org/ancla/pull/80)
## [v0.1.0]
- Initial release

[Unreleased]: https://github.com/xmidt-org/ancla/compare/v0.3.7...HEAD
[Unreleased]: https://github.com/xmidt-org/ancla/compare/v0.3.8...HEAD
[v0.3.8]: https://github.com/xmidt-org/ancla/compare/v0.3.7...v0.3.8
[v0.3.7]: https://github.com/xmidt-org/ancla/compare/v0.3.6...v0.3.7
[v0.3.6]: https://github.com/xmidt-org/ancla/compare/v0.3.5...v0.3.6
[v0.3.5]: https://github.com/xmidt-org/ancla/compare/v0.3.4...v0.3.5
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/xmidt-org/bascule v0.10.2
github.com/xmidt-org/httpaux v0.2.1
github.com/xmidt-org/touchstone v0.0.3
github.com/xmidt-org/webpa-common v1.11.5
github.com/xmidt-org/webpa-common/v2 v2.0.1
go.uber.org/fx v1.13.1
)
3 changes: 2 additions & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
kithttp "github.com/go-kit/kit/transport/http"
"github.com/spf13/cast"
"github.com/xmidt-org/httpaux/erraux"
"github.com/xmidt-org/webpa-common/logging"
"github.com/xmidt-org/webpa-common/v2/basculechecks"

"github.com/xmidt-org/bascule"
Expand Down Expand Up @@ -237,7 +238,7 @@ func errorEncoder(getLogger GetLoggerFunc) kithttp.ErrorEncoder {

logger := getLogger(ctx)
if logger != nil && code != http.StatusNotFound {
logger.Log("sending non-200, non-404 response", level.Key(), level.ErrorValue(), err, code)
logger.Log("msg", "sending non-200, non-404 response", level.Key(), level.ErrorValue(), "code", code, logging.ErrorKey(), err)
}

w.WriteHeader(code)
Expand Down

0 comments on commit d3db9b4

Please sign in to comment.