Skip to content

Commit

Permalink
clog: show underlying cher error_code (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
julesjcraske authored Oct 8, 2024
1 parent df33851 commit 677dc80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/clog/clog.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func SetError(ctx context.Context, err error) error {

cherErr := cher.E{}
if errors.As(err, &cherErr) {
ctxLogger.SetField("error_code", cherErr.Code)
if len(cherErr.Reasons) > 0 {
ctxLogger.SetField("error_reasons", cherErr.Reasons)
}
Expand Down

0 comments on commit 677dc80

Please sign in to comment.