You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Legal API: 403 when trying to file a coop special resolution (VERIFY) #29982
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?
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.
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
@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?
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]."
^^ 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.
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.
Activity
severinbeauvais commentedon Aug 6, 2025
@meawong Can you please have a quick look at this one and see if it's a quick fix? Thanks!
cc: @OlgaPotiagalova
severinbeauvais commentedon Aug 6, 2025
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
severinbeauvais commentedon Aug 6, 2025
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.
severinbeauvais commentedon Aug 11, 2025
This is being resolved by #27211.
[-]Legal API: 403 when trying to file a coop special resolution[/-][+]Legal API: 403 when trying to file a coop special resolution (VERIFY)[/+]jacqueline-williams-549 commentedon Aug 13, 2025
@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?
severinbeauvais commentedon Aug 13, 2025
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.
riyazuddinsyed commentedon Aug 18, 2025
Found a small issue while testing it..Moving back to progress.
https://app.zenhub.com/workspaces/entities---olga-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/30264
severinbeauvais commentedon Aug 18, 2025
^^ 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.
riyazuddinsyed commentedon Aug 18, 2025
I see the Unable to save and resume dialog while reloading to the Business Dashboard; both are different
severinbeauvais commentedon Aug 18, 2025
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.
riyazuddinsyed commentedon Aug 25, 2025
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