Skip to content

chore(exception)!: Enhance exception handling#760

Merged
AndyScherzinger merged 1 commit intomainfrom
chore/excepton
Oct 10, 2024
Merged

chore(exception)!: Enhance exception handling#760
AndyScherzinger merged 1 commit intomainfrom
chore/excepton

Conversation

@stefan-niedermann
Copy link
Member

@stefan-niedermann stefan-niedermann commented Sep 29, 2024

  • Replace http://localhost/ with http://example.com[/] because localhost is a possible valid host and therefore confusing for users. Considered info-removed-for-privacy-reasons.com (or something similar), but there is no guarantee that this domain is not registered. example.com can by definition not be registered.
  • Unify way to create a response on an exception by passing the whole exception object into the helper method
  • Use HTTP 900 for unknown exceptions to distinguish other proprietary status codes: HTTP 520 is for example used by Cloudflare. Note that HTTP 900 is also not standardized.

@AndyScherzinger
Copy link
Member

... rebased with latest toolchain in place...

- Replace http://localhost/ with http://example.com[/] because localhost ist a possible valid host and therefore confusing for users. Considered info-removed-for-privacy-reasons.com (or something similar), but there is no guarantee that this domain is not registered. example.com can by definition not be registered.
- Unify way to create a response on an exception by passing the whole exception object into the helper method
- Use HTTP 900 for unknown exceptions to distinguish other proprietary status codes: HTTP 520 is for example used by Cloudflare. Note that HTTP 900 is also not standardized.

Signed-off-by: Stefan Niedermann <info@niedermann.it>
Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

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

LGTM, codacy can be ignored 👍

@AndyScherzinger AndyScherzinger added this to the SSO Library 2.0.0 milestone Oct 9, 2024
@David-Development David-Development self-requested a review October 10, 2024 10:36
Copy link
Member

@David-Development David-Development left a comment

Choose a reason for hiding this comment

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

Great changes!

@AndyScherzinger AndyScherzinger merged commit d17c3fa into main Oct 10, 2024
@AndyScherzinger AndyScherzinger deleted the chore/excepton branch October 10, 2024 18:37
@github-actions
Copy link

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!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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.

3 participants