Skip to content

AZINTS-4118 Surface user actionable errors#64

Merged
benjjs merged 3 commits into
mainfrom
benjamin.johnsonstaub/azints-4118/surface-user-actionable-errors
Oct 31, 2025
Merged

AZINTS-4118 Surface user actionable errors#64
benjjs merged 3 commits into
mainfrom
benjamin.johnsonstaub/azints-4118/surface-user-actionable-errors

Conversation

@benjjs
Copy link
Copy Markdown
Collaborator

@benjjs benjjs commented Oct 29, 2025

Motivation

We have some LFO errors that should be resolvable by the user. We should make these visible and easy to read in the UI.

Summary

Introduce a new status USER_ACTIONABLE_ERROR for errors that are user actionable. I feel comfortable not making this in some way a subtype of the ERROR status because we want to handle these quite differently.

All user actionable errors that we're aware of currently exist in the LFO portion of the script, where Altan has made them subtypes of UserActionRequiredError. When we catch an error in the step reporter, we first check if it is one of these. If so, we use the new status. We also use the simple string representation of the exception instead of a trace or rich representation, as the message to the user should be only the user-readable portion we include as the explicit error message.

As a result, we may need a subsequent diff to update some error messages to be more complete and actionable. Ideally they should consist of 2 brief sentences:

  1. Explaining in a few words what the problem is.
  2. Telling the user how to solve it.

I've also removed some error catching and re-raising logic in the LFO steps. This was nuking exception types, and shouldn't be necessary as the status reporter context manager itself adds some context to exceptions that are intended for our eyes.

Testing

See https://github.com/DataDog/web-ui/pull/243696

@benjjs benjjs requested a review from a team as a code owner October 29, 2025 19:49
@benjjs benjjs changed the title Benjamin.johnsonstaub/azints 4118/surface user actionable errors AZINTS-4118 Surface user actionable errors Oct 29, 2025
Copy link
Copy Markdown
Member

@agulen agulen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, i'll do a pass over all the user actionable LFO errors to make sure we're showing user-friendly messages

@benjjs benjjs merged commit ecd0808 into main Oct 31, 2025
2 checks passed
@benjjs benjjs deleted the benjamin.johnsonstaub/azints-4118/surface-user-actionable-errors branch October 31, 2025 14:32
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