Repository navigation
Conversation
createErrorToaster used error.message for the toast description. For an API error that is only the HTTP status text, so a refused action showed just "Conflict": deleting a running Dag run toasted "Error deleting Dag Run / Conflict" while the API said the run cannot be deleted in running state. Use the response detail when the API sent one, through the existing getApiErrorDetail helper, and keep error.message as the fallback. The Human-in-the-loop response hook special-cased exactly this; it now uses the shared helper.
The clear hook showed the response detail only when it contained "AirflowClearRunningTaskException". Other refusals, such as "Cannot clear running task instances" or the loop-aware 409s, still toasted just "Conflict". Use the shared error toaster, which already shows the detail and skips 403s.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the API refuses an action, the error toast showed only the HTTP status text.
createErrorToasterusederror.message, which for anApiErroris the status text, so deleting a running Dag run toasted "Error deleting Dag Run / Conflict" while the response said why:The toaster now uses the response
detailwhen there is one, through the existinggetApiErrorDetail(already used byErrorAlert), and keepserror.messageas the fallback. Every action that goes through the shared toaster (delete, clear, patch, trigger, pause, …) benefits. 403s are still left to the MutationCache handler.Two hooks had worked around this on their own, and now use the shared helper:
useUpdateHITLDetailspecial-cased exactly this in Refuse Human-in-the-loop responses once the task stopped waiting #75645. Its test expected the bareresponse.errortitle key only on that branch; the shared helper translates the namespacedhitl:response.error, which renders the same text.useClearTaskInstancesshowed the detail only when it contained "AirflowClearRunningTaskException", so other refusals such as "Cannot clear running task instances" still showed "Conflict".On what gets shown: the text is rendered as a React text node, so no markup is interpreted. It is the same detail the browser already received and that
ErrorAlertalready displays. Database and Dag deserialization errors keep the statement redacted unless[api] expose_stacktraceis on, and validation errors show onlylocandmsg, never the submittedinput.Testing:
errorHandling.test.ts, plus a clear-task test; both fail against the old code.tsc, andprek(pre-commit and manual stages).Before
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines