Skip to content

Legal API: returns 401 for IA just submitted #31052

Open

Description

@severinbeauvais

Found in Dev.

Impact: I cannot see the IA I just submitted. This probably reproduces for all bootstrap filings. I cannot continue from business dashboard. However, if I go back to my BRD then I see my new business and can load it successfully.

To reproduce:

  1. login to Dev as a regular user (eg, BCREG0020)
  2. select the non-primary account (eg, "Severin Dev Account" not "resd")
  3. create a NR for a new coop (also reproduces for named and numbered corps)
  4. get the NR approved
  5. start the draft IA
  6. complete, submit and pay for the IA
  7. observe the issue:

image.png

image.png

Note: ignore that this is not using the Business API GW URL -- there's a reverse proxy in place so this network call should succeed anyway. (Fixing the URL will be a separate UI ticket.) Also, I patched the code locally to fix the URL and the same API error was returned.

Sample URLs:
coop: https://dev.business-dashboard.bcregistry.gov.bc.ca/TzOk9ayBWV?filing_id=206615&accountid=2288
numbered corp: https://dev.business-dashboard.bcregistry.gov.bc.ca/T99cg5uLMV?filing_id=206616&accountid=2288
numbered corp (different account): https://dev.business-dashboard.bcregistry.gov.bc.ca/Tsqdm363tn?filing_id=206617&accountid=668

Activity

  1. added
    bug
    Entities Team
    on Oct 22, 2025
  2. severinbeauvais commented on Oct 22, 2025

    @severinbeauvais
    CollaboratorAuthor

    deleted obsolete comment

  3. changed the title [-]Business Dashboard UI: fails to load IA just submitted[/-] [+]Legal API: returns 401 for IA just submitted[/+] on Oct 22, 2025
  4. severinbeauvais commented on Oct 22, 2025

    @severinbeauvais
    CollaboratorAuthor

    Analysis

    This only appears to fail when it is a regular user. As staff, I was able to load the bootstrap filings properly.

    Argus found that some API code was returning the subject error:
    https://github.com/bcgov/lear/blob/15cda9897e2067e2ae298453bdca840019072a32/legal-api/src/legal_api/resources/v2/business/business_filings/business_filings.py#L105-L114

    Root cause: breakage was caused by PR 3804, ticket 29005.

    Temporary resolution: Argus turned off the FF, which disables this code, and now all bootstrap filings load properly.

    Solution: See Kial's comment below.

  5. severinbeauvais commented on Oct 22, 2025

    @severinbeauvais
    CollaboratorAuthor
  6. severinbeauvais commented on Oct 23, 2025

    @severinbeauvais
    CollaboratorAuthor

    Please ignore commit above that I accidentally linked to this ticket. It's for another ticket.

  7. kialj876 commented on Oct 23, 2025

    @kialj876
    Collaborator

    The FF just turns on a check that the user has read access on the filing data. The bootstrap flow will need to be updated so that the backend knows if the regular user has access to it or not before this flag is turned on again. The priority for this is quite low I think (flag was only on in dev)

  8. severinbeauvais commented on Oct 23, 2025

    @severinbeauvais
    CollaboratorAuthor

    @kialj876 To work around the error described above, the FF was disabled in Dev. How does this affect the original ticket that made these changes (#29005)? What is the priority of THIS ticket given that some, presumably necessary, functionality was disabled?

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

Metadata

Metadata

Assignees

Labels

Entities Teambug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions