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

add not found redirection logic if object in url param not exists #10339

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

etiennejouan
Copy link
Contributor

closes #10150

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR implements 404 redirection logic when users attempt to access non-existent object pages through URL manipulation.

  • Moved <PageChangeEffect /> inside <ObjectMetadataItemsGater> in AppRouterProviders.tsx to access object metadata context
  • Added URL parameter validation in usePageChangeEffectNavigateLocation.ts to check object names against metadata
  • Added test cases in usePageChangeEffectNavigateLocation.test.ts for non-existent object scenarios
  • Implemented redirection to NotFound page when invalid object names are detected in URLs

3 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

@etiennejouan etiennejouan mentioned this pull request Feb 19, 2025
@etiennejouan etiennejouan merged commit ef9328e into main Feb 20, 2025
47 checks passed
@etiennejouan etiennejouan deleted the ej/10150 branch February 20, 2025 08:17
Copy link
Contributor

Thanks @etiennejouan for your contribution!
This marks your 25th PR on the repo. You're top 2% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

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

Successfully merging this pull request may close these issues.

Avoid redirecting to non existing page
2 participants