Skip to content

feat: errorExpression for http steps (#6356)#6414

Open
zoeyfyi wants to merge 4 commits into
akuity:mainfrom
zoeyfyi:error-expression
Open

feat: errorExpression for http steps (#6356)#6414
zoeyfyi wants to merge 4 commits into
akuity:mainfrom
zoeyfyi:error-expression

Conversation

@zoeyfyi

@zoeyfyi zoeyfyi commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #6356

Adds errorExpression to a http steps config. If a http step reaches a terminal failure (i.e. failureExpression evaluates to true) we attempt to extract an error message from the response by evaluating errorExpression. If evaluation fails, fall back to the original error message, otherwise we add the extracted error message to the message to the promotion step result.

Screenshot 2026-06-01 at 14 17 57

Checklist

Eligibility

  • Linked to an existing issue with no blocking labels (kind/proposal, needs discussion, needs research, maintainer only, area/security, size/large, size/x-large, size/xx-large).
  • Changes documentation only.
  • Changes ten lines or fewer.

Quality

  • Adds or updates corresponding tests.
  • Adds or updates corresponding documentation.

AI Use Disclosure

This PR was written:

  • By a human without AI assistance.
  • By a human with AI assistance. A human has reviewed every line prior to opening the PR.
  • By an AI with human supervision. A human has reviewed every line prior to opening the PR.
  • Entirely by an AI. No human has reviewed this prior to opening the PR.

Sign-Off

All commits:

  • Are signed off by their author (git commit -s) (required)
  • Are cryptographically signed (git commit -S) (encouraged)

zoeyfyi added 2 commits June 1, 2026 14:12
Signed-off-by: Zoey Sheffield <zoey.sheffield@anaplan.com>
Signed-off-by: Zoey Sheffield <zoey.sheffield@anaplan.com>
@zoeyfyi zoeyfyi requested review from a team as code owners June 5, 2026 09:49
@netlify

netlify Bot commented Jun 5, 2026

Copy link
Copy Markdown

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit dd5e2d5
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/6a2686ecb034170008c199d7
😎 Deploy Preview https://deploy-preview-6414.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kargo-governance-bot kargo-governance-bot Bot added area/controller Affects the (main) controller kind/enhancement An entirely new feature needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed labels Jun 5, 2026
Signed-off-by: Zoey Sheffield <zoey.sheffield@anaplan.com>
@zoeyfyi zoeyfyi force-pushed the error-expression branch from 455416e to 889f538 Compare June 5, 2026 09:51
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.36%. Comparing base (edc4a3c) to head (dd5e2d5).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6414      +/-   ##
==========================================
+ Coverage   58.30%   58.36%   +0.06%     
==========================================
  Files         500      500              
  Lines       41920    42018      +98     
==========================================
+ Hits        24441    24525      +84     
- Misses      16011    16024      +13     
- Partials     1468     1469       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@krancour

krancour commented Jun 6, 2026

Copy link
Copy Markdown
Member

Thank you @zoeyfyi! I only looked at docs so far -- which look good overall. My only ask would be to see if this feature can be worked into an example. As you had called out in the original issue, expr lang features like nil coalescing play a particularly important role here. Or expressions that check response code first to determine if a body from which to extract information may even exist may also be realistic.

@fuskovic would you mind reviewing the implementation please?

Signed-off-by: Zoey Sheffield <zoey.sheffield@anaplan.com>
@zoeyfyi zoeyfyi force-pushed the error-expression branch from 3678148 to dd5e2d5 Compare June 8, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/controller Affects the (main) controller kind/enhancement An entirely new feature needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

errorExpression in http steps for richer error messages

2 participants