Skip to content
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

fix: fixed the intermittent page 404 error #50

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

JazzarKarim
Copy link
Collaborator

@JazzarKarim JazzarKarim commented Jan 13, 2025

bcgov/entity#25225

Fixed the page 404 error that is shown for about a second before showing the page.

Also, this error should be fixed for the magic links.

ALSO, as a part of this fix, the multiple/extra redirections of all routes are no longer present since I removed the middleware 😁 Things should be faster now.

Basically this makes routing much much better across the board across all links (magic link, incorporate now, and the BRD of accounts).

@JazzarKarim JazzarKarim self-assigned this Jan 13, 2025
@JazzarKarim
Copy link
Collaborator Author

/gcbrun

@@ -88,7 +88,7 @@ export default defineNuxtConfig({
file: 'fr-CA.ts'
}
],
strategy: 'prefix',
strategy: 'prefix_except_default',
Copy link
Collaborator Author

@JazzarKarim JazzarKarim Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the main culprit. Basically, what this was doing, is add that prefix to everything. This messed up the routing and needed middleware and other stuff. Changing this now follows proper routing in such that "/account/3040" works for example directly without the need to process it using extra code.

@bcgov bcgov deleted a comment from bcregistry-sre Jan 13, 2025
@severinbeauvais
Copy link
Collaborator

ALSO, as a part of this fix, the multiple/extra redirections of all routes are no longer present since I removed the middleware 😁 Things should be faster now.

Basically this makes routing much much better across the board across all links (magic link, incorporate now, and the BRD of accounts).

I noticed this: no re-routes and therefore much faster to get to the page. Well done!

@JazzarKarim
Copy link
Collaborator Author

Sev, can you please give these a try and tell me if you still see this error? @severinbeauvais
https://business-registry-dev--pr-50-atqlpmd1.web.app/account/3040

I didn't see the 404 page.

https://business-registry-dev--pr-50-atqlpmd1.web.app/incorporateNow?nrId=NR+0521856&phone=1112223333

I didn't see the 404 page but I do see this:

image

https://business-registry-dev--pr-50-atqlpmd1.web.app//affiliationInvitation/acceptToken?token=eyJpZCI6NDk5LCJmcm9tT3JnSWQiOjY2OCwidG9PcmdJZCI6bnVsbCwiYnVzaW5lc3NJZGVudGlmaWVyIjoiQkMwODgzNjM5In0.Z4WErg.32WZ6EdLuAYj1jdfV6Xf111HxHg&orgName=cmVzZA%253D%253D

I didn't see the 404 page but I do see this:

image

These dialogs are OK. They are old links that I pulled up from old PRs. The idea is just to test the routing. If we're getting to the BRD with no errors, it's good.

@JazzarKarim JazzarKarim merged commit 60c6182 into bcgov:main Jan 13, 2025
8 of 10 checks passed
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