Skip to content

Legal API: 403 when trying to file a coop special resolution (VERIFY) #29982

Closed

Description

@severinbeauvais

This reproduces in Dev and Test. (This is not reported in Prod because Special Resolutions are blocked by #29858.

Filing a Special Resolution results in a HTTP 403 (forbidden / not allowed).

image.jpg

Activity

  1. added
    bug
    Entities Team
    on Aug 6, 2025
  2. severinbeauvais commented on Aug 6, 2025

    @severinbeauvais
    CollaboratorAuthor

    @meawong Can you please have a quick look at this one and see if it's a quick fix? Thanks!

    cc: @OlgaPotiagalova

  3. severinbeauvais commented on Aug 6, 2025

    @severinbeauvais
    CollaboratorAuthor

    Oh! I think I know what this is...

    If you started a Special Resolution and then saved it, a draft is created it. Unfortunately, due to #29846, when you go to resume it, the draft isn't reloaded. Then, then you try to file the "new" Special Resolution, the API blocks you because you already have a draft.

    It would be nice to have a better API response, but the code doesn't know why this filing isn't allowed. Maybe we can still improve on the message.

    Before #25112, the response message was:
    "You are not authorized to submit a filing for {identifier}."
    Now, the message is:
    "You are not allowed to submit this type of filing for {identifier}."

    @janisrogers @jacqueline-williams-549 Any thoughts on improving the message to generically cover all reasons why the subject filing is not allowed at the current time?

    cc: @riyazuddinsyed

  4. severinbeauvais commented on Aug 6, 2025

    @severinbeauvais
    CollaboratorAuthor

    Given that a Special Resolution can be successfully be filed (as long as there isn't a draft in the dashboard), this ticket is not a blocker for the feature.

    I am setting the priority of this ticket to "3", same as #29846 which is the root cause of THIS ticket.

    THIS ticket can remain open if we want to improve the API response for the 403 error.

  5. severinbeauvais commented on Aug 11, 2025

    @severinbeauvais
    CollaboratorAuthor

    This is being resolved by #27211.

  6. changed the title [-]Legal API: 403 when trying to file a coop special resolution[/-] [+]Legal API: 403 when trying to file a coop special resolution (VERIFY)[/+] on Aug 11, 2025
  7. jacqueline-williams-549 commented on Aug 13, 2025

    @jacqueline-williams-549

    @severinbeauvais
    In order to write an error message that takes into account all the scenarios, can you write all the scenarios here.
    Since this ticket is the same priority level as fixing the bug, do we really need this ticket?

  8. severinbeauvais commented on Aug 13, 2025

    @severinbeauvais
    CollaboratorAuthor

    As per ticket #27211, there are 3 possible "authorization" errors when trying to file something:

    1. Not Permitted

    You will get this message if you try to file something that you don't have permission to (per earlier account/permissions work). As long as your permissions don't change, you will never be permitted to file this.

    The return code is HTTP 403 (forbidden) and the message is "Permission Denied - You do not have permissions to submit this type of filing for: [business id]."

    This is the one I am asking about, although I think this message is good now.

    2. Not Authorized

    You will get this message if your Keycloak token is missing or invalid or expired. Basically, you need to login again (or fix your login credentials for API users).

    The return code is HTTP 401 (unauthorized) and the message is "Not Authorized - You are not authorized to submit filings for [business id]."

    This is an existing message.

    3. Not Allowed

    You will get this message if the "allowable actions" matrix prevents it. For example: the business is not in the proper state, or there is an existing draft, or this is a staff-only filing, or this filing doesn't apply to this entity type, or many other blockers (ref). You are not currently allowed to file this, but under other conditions, you might be.

    The return code is HTTP 403 (forbidden) and the message is "Not Allowed - You are not allowed to submit this type of filing for [business id]."

    This is an existing message.

  9. riyazuddinsyed commented on Aug 18, 2025

    @riyazuddinsyed
    Contributor
  10. severinbeauvais commented on Aug 18, 2025

    @severinbeauvais
    CollaboratorAuthor

    ^^ That's a known issue (see #29846). It is not caused by Rajan's fix, above. Actually, Rajan's fix means you will see a "403 -- not allowed" response when you try to save the second SR draft. This is helpful because you'll know it's not a permission or authorization issue.

    Therefore, I think this ticket should go back to QA, please and thanks.

  11. riyazuddinsyed commented on Aug 18, 2025

    @riyazuddinsyed
    Contributor

    I see the Unable to save and resume dialog while reloading to the Business Dashboard; both are different

  12. severinbeauvais commented on Aug 18, 2025

    @severinbeauvais
    CollaboratorAuthor

    Both what are different from what? Why do you think that's not the known bug I mentioned and is actually related to THIS ticket? I don't have enough information to know where to go with this.

  13. riyazuddinsyed commented on Aug 25, 2025

    @riyazuddinsyed
    Contributor

    Verified in test.Working as expected.A relevant issue found was flagged https://app.zenhub.com/workspaces/entities---olga-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/30264.So moving this ticket too done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Entities TeamPriority3bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions