Skip to content

fix: include error_code in PreventRegistration exception response - #684

Merged
Waleed-Mujahid merged 1 commit into
develop-sumacfrom
waleed/7712-link-user-multisite
Jul 23, 2025
Merged

fix: include error_code in PreventRegistration exception response#684
Waleed-Mujahid merged 1 commit into
develop-sumacfrom
waleed/7712-link-user-multisite

Conversation

@Waleed-Mujahid

@Waleed-Mujahid Waleed-Mujahid commented Jul 11, 2025

Copy link
Copy Markdown
Member

Description

The Authn MFE relies on the error_code in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports error_code, it was not previously included in the API response payload.

This change ensures that error_code is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

StudentLoginRequested filter already does this but StudentRegistrationRequested does not

        try:
            possibly_authenticated_user = StudentLoginRequested.run_filter(user=possibly_authenticated_user)
        except StudentLoginRequested.PreventLogin as exc:
            raise AuthFailedError(
                str(exc), redirect_url=exc.redirect_to, error_code=exc.error_code, context=exc.context,
            ) from exc

Authn MFE PR:

edly-io/frontend-app-authn#15

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.
@Waleed-Mujahid Waleed-Mujahid self-assigned this Jul 11, 2025
@Waleed-Mujahid
Waleed-Mujahid merged commit 40dc191 into develop-sumac Jul 23, 2025
25 of 50 checks passed
@Waleed-Mujahid
Waleed-Mujahid deleted the waleed/7712-link-user-multisite branch July 23, 2025 06:58
Waleed-Mujahid added a commit that referenced this pull request Aug 4, 2025
The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.
Waleed-Mujahid added a commit that referenced this pull request Aug 4, 2025
The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.
Waleed-Mujahid added a commit that referenced this pull request Aug 4, 2025
The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.
Waleed-Mujahid added a commit that referenced this pull request Aug 4, 2025
The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.
Waleed-Mujahid added a commit that referenced this pull request Aug 7, 2025
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Waleed-Mujahid added a commit that referenced this pull request Dec 1, 2025
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Waleed-Mujahid added a commit that referenced this pull request Dec 1, 2025
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Waleed-Mujahid added a commit that referenced this pull request Dec 2, 2025
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Anas-hameed pushed a commit that referenced this pull request Dec 2, 2025
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Waleed-Mujahid added a commit that referenced this pull request Dec 2, 2025
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Anas-hameed pushed a commit that referenced this pull request Jan 19, 2026
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Anas-hameed pushed a commit that referenced this pull request Jan 19, 2026
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Anas-hameed pushed a commit that referenced this pull request Feb 19, 2026
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Anas-hameed pushed a commit that referenced this pull request Feb 20, 2026
* feat: filter organizations with new openedx-filter (#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Copilot AI pushed a commit to AhtishamShahid/edx-platform that referenced this pull request Mar 4, 2026
* feat: filter organizations with new openedx-filter (edly-io#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (edly-io#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
(cherry picked from commit c28fc87)
Copilot AI pushed a commit to AhtishamShahid/edx-platform that referenced this pull request Mar 4, 2026
* feat: filter organizations with new openedx-filter (edly-io#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (edly-io#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
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.

3 participants