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

[🕹️] Switching Workspace when api selected leads to 404 #2213

Open
3 tasks done
Flo4604 opened this issue Oct 5, 2024 · 34 comments
Open
3 tasks done

[🕹️] Switching Workspace when api selected leads to 404 #2213

Flo4604 opened this issue Oct 5, 2024 · 34 comments
Assignees
Labels
Bug Something isn't working Core Team

Comments

@Flo4604
Copy link
Contributor

Flo4604 commented Oct 5, 2024

Preliminary Checks

Reproduction / Replay Link (Optional)

No response

Issue Summary

When I select an API in a workspace and switch to another workspace, I get a 404 page.

Steps to Reproduce

  1. Select a API in a workspace
  2. Switch to another workspace
  3. See 404 page
    See repro video

Expected behavior

I would like to be redirected to the API overview instead

Other information

No response

Screenshots

switch_workspace.mp4

Version info

-
@Flo4604 Flo4604 added Bug Something isn't working Needs Approval Needs approval from Unkey labels Oct 5, 2024
Copy link

linear bot commented Oct 5, 2024

@chronark
Copy link
Collaborator

chronark commented Oct 5, 2024

Yes!!

In /apis/[apiId]/page.tsx we should return redirect("/apis") instead of return notFound()

@chronark
Copy link
Collaborator

chronark commented Oct 5, 2024

/award 150

Copy link

oss-gg bot commented Oct 5, 2024

Awarding Flo4604: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/Flo4604

@AkshayBandi027
Copy link
Contributor

/assign

Copy link

oss-gg bot commented Oct 5, 2024

Assigned to @AkshayBandi027! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@AkshayBandi027
Copy link
Contributor

AkshayBandi027 commented Oct 5, 2024

Hey @chronark !! the problem is occurring across multiple dynamic routes, including API , rate limiting, and authorization. When a user changes their organization, it cannot the specific
data, so its returns notfound()

Two Potential Solutions

Router Push Solution: When the user changes their organization, the router can push to a standard route (e.g., /apis) instead of the current route. in changeOrg function .
router.push("/apis")

Redirect Solution: we need to add redirect in mulitple dynamic route inlcuding api,rate limiting and authorization
. (e.g. In /apis/[apiId]/page.tsx we should return redirect("/apis") instead of return notFound())

@chronark
Copy link
Collaborator

chronark commented Oct 5, 2024

We're about to change how the changeOrg stuff works, let's not change that now.
I also think handling this per page and setting a better fallback (ie /apis) is better in general, cause it's more explicit and catches the error even if the root cause is something other than changing orgs

Copy link

oss-gg bot commented Oct 7, 2024

@AkshayBandi027, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

1 similar comment
Copy link

oss-gg bot commented Oct 9, 2024

@AkshayBandi027, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@mohitejaikumar
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

This issue is already assigned to another person. Please find more issues here.

@mohitejaikumar
Copy link

@chronark I think no one is working on this can I work on this

@adkibhaskar
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

This issue is already assigned to another person. Please find more issues here.

@diwasrimal
Copy link

/assign

Copy link

oss-gg bot commented Oct 10, 2024

Assigned to @diwasrimal! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@mohitejaikumar
Copy link

@chronark I first asked you to assign it to me 🥹

@chronark
Copy link
Collaborator

@mohitejaikumar this month, all issues can be assigned by you via /assign, maintainers don't assign issues manually right now
you can read more on https://oss.gg

@mohitejaikumar
Copy link

/assign

Copy link

oss-gg bot commented Oct 11, 2024

This issue is already assigned to another person. Please find more issues here.

@no-naame
Copy link

/assign

Copy link

oss-gg bot commented Oct 14, 2024

This issue is already assigned to another person. Please find more issues here.

@diwasrimal
Copy link

/unassign

@oss-gg oss-gg bot unassigned diwasrimal Oct 15, 2024
Copy link

oss-gg bot commented Oct 15, 2024

Issue unassigned.

@anuj5926
Copy link

/assign

Copy link

oss-gg bot commented Oct 15, 2024

Assigned to @anuj5926! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

Copy link

oss-gg bot commented Oct 18, 2024

@anuj5926, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@mohitejaikumar
Copy link

/assign

Copy link

oss-gg bot commented Oct 19, 2024

This issue is already assigned to another person. Please find more issues here.

Copy link

oss-gg bot commented Oct 20, 2024

@anuj5926, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@Vardhaman619
Copy link
Contributor

/assign

Copy link

oss-gg bot commented Oct 22, 2024

This issue is already assigned to another person. Please find more issues here.

@chronark
Copy link
Collaborator

cc @mcstepp, for when we change to slug based navigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Core Team
Projects
None yet
Development

No branches or pull requests

10 participants