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

Fix: catch errors on capabilities re-fetching #270

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jul 24, 2023

☑️ Resolves

With invalid credentials, capabilities were infinitely re-fetching.

🚧 Tasks

  • Catch errors on dirty AppData re-fetching
    • In the case of 401 Unauthenticated - reset appData (aka logout)
    • In the case of other errors such as Network connection, server unavailable and maintenance - re-try recursively
      • The delay of re-try increases exponentially from 1 second to 128 seconds (~2 minutes).

Drawbacks:

  • In development mode, we cannot detect if there is a network error or authentication (CORS fails anyway for a failed request).
  • Could there be another error that should also be a reset trigger?
  • Add close button on Welcome Window #19 is still actual

@ShGKme ShGKme added this to the Next Preview milestone Jul 24, 2023
@ShGKme ShGKme self-assigned this Jul 24, 2023
@ShGKme ShGKme force-pushed the fix/catch-errors-on-capabilities-refetching branch from e5bea77 to 894e3fa Compare July 24, 2023 12:58
- Reset capabilities on Unauthenticated error
- Re-fetch with  timeout on other errors such as network errors or maintance 

Signed-off-by: Grigorii K. Shartsev <[email protected]>
@ShGKme ShGKme force-pushed the fix/catch-errors-on-capabilities-refetching branch from 894e3fa to 95e5f04 Compare July 24, 2023 12:59
@ShGKme ShGKme merged commit 825e123 into main Jul 24, 2023
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/catch-errors-on-capabilities-refetching branch July 24, 2023 13:03
This was referenced Jul 24, 2023
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

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.

2 participants