Skip to content

derive Outcome from TangoError error codes - #244

Merged
xytan0056 merged 1 commit into
mainfrom
refactor/outcome-error-code
Jul 27, 2026
Merged

derive Outcome from TangoError error codes#244
xytan0056 merged 1 commit into
mainfrom
refactor/outcome-error-code

Conversation

@xytan0056

Copy link
Copy Markdown
Contributor

Summary

  • Replace the hardcoded failure/cancelled switch in metrics.Outcome with a delegation to tangoerrors.GetErrorCode, which returns the error's classified code (infra, cancelled, user, infra_retryable).
  • This gives the finish histogram's result tag full error-code granularity instead of collapsing everything non-cancelled into "failure".
  • Remove the now-unused ResultFailure and ResultCancelled constants.

Test plan

  • Updated TestOutcome and TestBeginComplete to cover all four error codes
  • make test — all 23 tests pass

Replace the hardcoded failure/cancelled switch in metrics.Outcome with
a delegation to tangoerrors.GetErrorCode, which returns the error's
classified code (infra, cancelled, user, infra_retryable). This gives
the finish histogram's result tag full error-code granularity instead
of collapsing everything non-cancelled into "failure".

Remove the now-unused ResultFailure and ResultCancelled constants.
@xytan0056
xytan0056 requested review from a team as code owners July 27, 2026 17:48
@xytan0056 xytan0056 changed the title refactor(metrics): derive Outcome from TangoError error codes derive Outcome from TangoError error codes Jul 27, 2026
@xytan0056
xytan0056 merged commit 93d0825 into main Jul 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants