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

Uniform error handling #1687

Merged
merged 8 commits into from
Nov 19, 2024

Conversation

CannonLock
Copy link
Contributor

@CannonLock CannonLock commented Oct 25, 2024

  • Add error helpers for api calls
  • Create Uniform error handling and alerting interface
    • This is extensible to report many errors and complex errors to the user
  • Moved all error handling to the new interface

Couple things that will make this a better path forward.

  • Uniform interface makes error reporting the same on each page.
    • Easier to implement for dev, easier to find for users.
    • Same function wraps all backend calls so we can do bulk handling of functionality.
  • Design allows for saving errors to pull up later ( Not yet implemented )
    • This will help if for some reason there is multiple errors in a row

Closes #1582

Allows us to have more consistent styles with this code and the other code that we write that is compiled for js consumption.

If we need a .d.ts file we can let the compiler create it.
@CannonLock
Copy link
Contributor Author

CannonLock commented Oct 28, 2024

Removing error alerts that look like the top image in favor of potentially infinitely nested ones that look like below.

Screenshot 2024-10-25 at 12 56 18 PM Screenshot 2024-10-25 at 10 55 32 AM

@CannonLock CannonLock requested a review from h2zh October 28, 2024 13:33
@CannonLock CannonLock added the enhancement New feature or request label Oct 29, 2024
@h2zh
Copy link
Collaborator

h2zh commented Nov 5, 2024

image
Could you take a further look at this problem?

- Move registry pages behind auth check
- Create get.ts which holds api endpoints that get updated
- Fix AuthenticatedContent.tsx to check it auth value is true
@CannonLock
Copy link
Contributor Author

Had to close another issue when implementing the auth'd registry pages.

Closes #1728

@h2zh
Copy link
Collaborator

h2zh commented Nov 12, 2024

There's a failed Ubuntu test, could you take a second look when you have a chance

@CannonLock
Copy link
Contributor Author

@h2zh Do you have any insights into the failure? This is a UI only change so it shouldn't effect any of the pelican tests unless the web build itself failed which I know isn't the case.

@CannonLock CannonLock linked an issue Nov 18, 2024 that may be closed by this pull request
@jhiemstrawisc
Copy link
Member

@h2zh Do you have any insights into the failure? This is a UI only change so it shouldn't effect any of the pelican tests unless the web build itself failed which I know isn't the case.

@CannonLock, this is a known bad test at this point. If the failing localcache test is all that's blocking you, feel free to disregard it.

@CannonLock CannonLock merged commit f5037ac into PelicanPlatform:main Nov 19, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty Federation Overview when not authenticated Move Status Snackbar and Context to top Level
3 participants