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

Handle correctly not found errors in admin and chooser parts. #1060

Merged
merged 7 commits into from
Apr 2, 2024
Merged

Handle correctly not found errors in admin and chooser parts. #1060

merged 7 commits into from
Apr 2, 2024

Conversation

dsuhinin
Copy link
Collaborator

@dsuhinin dsuhinin commented Mar 28, 2024

What's inside the box:

  • now we have not-found page for chooser and admin parts, where we can redirect users in case of some errors. This is how not-found page looks now:
Screenshot 2024-03-28 at 14 46 10

@dsuhinin dsuhinin linked an issue Mar 28, 2024 that may be closed by this pull request
<link rel="stylesheet" href="/admin/static/css/namespaces.css">
<link rel="icon" type="image/x-icon" href="/static/chooser/favicon.ico">
<link rel="icon" type="image/x-icon" href="/static/chooser/static/favicon.ico">
Copy link
Contributor

Choose a reason for hiding this comment

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

/static/chooser/static seems like one-too-many static directories.

Copy link
Collaborator Author

@dsuhinin dsuhinin Mar 28, 2024

Choose a reason for hiding this comment

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

unfortunately this is how it should be handled. we have new routes /chooser/namespaces so we can't for example start with just a chooser for our static data because it will be a collision. I tried different ways and current one is the most working.

Copy link
Contributor

@suprjinx suprjinx Apr 1, 2024

Choose a reason for hiding this comment

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

Well at least the sources do not have static/../static path, but it seems like there'd be a way to avoid this url path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let me try to play but Im not fully sure. we we can skip first static from /static/chooser/static/, then it means that we have to mount routing to just /chooser which won't work. means if we call /chooser/namespaces, it wont work, because /chooser will catch this call which is logical.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, a bit reorganised everything.

suprjinx
suprjinx previously approved these changes Apr 1, 2024
Copy link
Contributor

@suprjinx suprjinx left a comment

Choose a reason for hiding this comment

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

LGTM

@dsuhinin dsuhinin merged commit b8b5886 into G-Research:main Apr 2, 2024
17 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.

User auth failures in HTML sites need HTML response of some sort
2 participants