Skip to content

Add proper status for failed nodes. #6672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inthirakumaaran
Copy link
Contributor

Proposed changes in this pull request

Fix flow status in the fail() function

Copy link

sonarqubecloud bot commented Apr 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
B Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.85%. Comparing base (55ffca5) to head (45fc74d).
Report is 94 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6672      +/-   ##
============================================
+ Coverage     47.37%   47.85%   +0.48%     
- Complexity    15890    16150     +260     
============================================
  Files          1820     1823       +3     
  Lines        109188   110133     +945     
  Branches      20426    20395      -31     
============================================
+ Hits          51726    52708     +982     
+ Misses        50293    50178     -115     
- Partials       7169     7247      +78     
Flag Coverage Δ
unit 32.01% <100.00%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@PasinduYeshan
Copy link
Contributor

PasinduYeshan commented Apr 10, 2025

Observation on Basic Auth failure response:

Without the fix:
200

{
    "flowStatus": "SUCCESS_COMPLETED",
    "authData": {
        "error_description": "Password has expired.",
        "error": "ABA-60003"
    }
}

With the fix:
400 Bad Request

{
    "code": "ABA-60002",
    "message": "ABA-60003 - Password has expired.",
    "description": "Authentication flow has concluded with a failure.",
    "traceId": "65a09c57-6c19-4241-af0f-7136ed669598"
}

This constitutes a breaking change, especially for clients or consumers that relied on the previous 200 OK response pattern. Any logic keyed on status code or "flowStatus" will likely need updating to align with the new error structure.

@inthirakumaaran
Copy link
Contributor Author

@PasinduYeshan

However, in the standard (UI-based) login flow, we maintain the current behavior (status code will be 200). For app-native authentication, this would be a significant change but one we should accept in order to ensure the correct behavior. On that note, we don't need a flowStatus for the FAIL_COMPLETED flow.

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