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

Update utils.js #1660

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update utils.js #1660

wants to merge 1 commit into from

Conversation

Harshalyadav
Copy link
Contributor

Description

Walletid not match redirect 404 #1546

Fixes # (issue)

#1546

Walletid not match redirect 404 Greenstand#1546
@@ -231,7 +231,7 @@ const wrapper = (callback) => (params) =>
if (e.response?.status === 404) return { notFound: true };
return {
redirect: {
destination: '/500',
destination: '/404',
Copy link
Collaborator

Choose a reason for hiding this comment

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

When I re-think this change, I think it is problematic, the previous logic is:

  1. If the status code is 404, then return notFound, which means 404 page.
  2. If any other case, return 500, means, unknown internal error
    So I think we shouldn't make all error 404, that's confusing.

Back the the issue, the URL return 500 but 404, I thought this is because of some 500 error in the server side, but it is 404, so we need to debug the specific URL to see what happened, and handle that error then throw 404 to the wrapper.

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.

2 participants