Skip to content

Commit d3db9b4

Browse files
fixed missing field in errorEncoder (#102)
* fixed missing field in errorEncoder * added in missing error key Co-authored-by: Kristina Pathak <kmspring57@gmail.com> * fixed vendoring * prepped changelog for release Co-authored-by: Kristina Pathak <kmspring57@gmail.com>
1 parent 08cb18c commit d3db9b4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
10+
## [v0.3.8]
811
- Added measures and providemetrics func to metrics.go. [#98](https://github.com/xmidt-org/ancla/pull/98)
12+
- Fixed missing field in errorEncoder logging. [#102](https://github.com/xmidt-org/ancla/pull/102)
913

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

97-
[Unreleased]: https://github.com/xmidt-org/ancla/compare/v0.3.7...HEAD
101+
[Unreleased]: https://github.com/xmidt-org/ancla/compare/v0.3.8...HEAD
102+
[v0.3.8]: https://github.com/xmidt-org/ancla/compare/v0.3.7...v0.3.8
98103
[v0.3.7]: https://github.com/xmidt-org/ancla/compare/v0.3.6...v0.3.7
99104
[v0.3.6]: https://github.com/xmidt-org/ancla/compare/v0.3.5...v0.3.6
100105
[v0.3.5]: https://github.com/xmidt-org/ancla/compare/v0.3.4...v0.3.5

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ require (
1212
github.com/xmidt-org/bascule v0.10.2
1313
github.com/xmidt-org/httpaux v0.2.1
1414
github.com/xmidt-org/touchstone v0.0.3
15+
github.com/xmidt-org/webpa-common v1.11.5
1516
github.com/xmidt-org/webpa-common/v2 v2.0.1
1617
go.uber.org/fx v1.13.1
1718
)

transport.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
kithttp "github.com/go-kit/kit/transport/http"
3333
"github.com/spf13/cast"
3434
"github.com/xmidt-org/httpaux/erraux"
35+
"github.com/xmidt-org/webpa-common/logging"
3536
"github.com/xmidt-org/webpa-common/v2/basculechecks"
3637

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

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

243244
w.WriteHeader(code)

0 commit comments

Comments
 (0)