Skip to content

Commit

Permalink
fix: updateErrorForSpan in tracing service (GaloyMoney#2412)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi authored Mar 8, 2023
1 parent 65ce0e1 commit ca29c3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ const updateErrorForSpan = ({
span: Span
errorLevel: ErrorLevel
}): boolean => {
const spanErrorRank = RankedErrorLevel.indexOf(span.attributes["error.level"])
const spanErrorLevel = (span && span.attributes["error.level"]) || ErrorLevel.Info
const spanErrorRank = RankedErrorLevel.indexOf(spanErrorLevel)
const errorRank = RankedErrorLevel.indexOf(errorLevel)

return errorRank >= spanErrorRank
Expand Down

0 comments on commit ca29c3b

Please sign in to comment.