Skip to content

Conversation

@RadoslavPetkow
Copy link
Contributor

@RadoslavPetkow RadoslavPetkow commented Feb 2, 2025

Refactored request handling and optimized redirect evaluation logic to improve maintainability and reduce redundancy.

Changes:

  • Extracted redirect evaluation logic into a reusable evaluateRedirects method.
  • Removed nested try-catch blocks for better readability and error handling.
  • Ensured request immutability by creating separate variables for normalized URLs.
  • Improved logging for better debugging in case of redirect failures.
  • Preserved original logic while making it more efficient and maintainable.

These changes should maintain the same behavior while simplifying the code structure and reducing unnecessary operations.

Summary

Screenshots (optional)

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

Refactored request handling and optimized redirect evaluation logic to improve maintainability and reduce redundancy.

Changes:
- Extracted redirect evaluation logic into a reusable `evaluateRedirects` method.
- Removed nested try-catch blocks for better readability and error handling.
- Ensured request immutability by creating separate variables for normalized URLs.
- Improved logging for better debugging in case of redirect failures.
- Preserved original logic while making it more efficient and maintainable.

These changes should maintain the same behavior while simplifying the code structure and reducing unnecessary operations.
@kodster28
Copy link
Collaborator

Howdy @RadoslavPetkow, apologies looks like this has gotten a little stale.

Going to close this out for now as our redirects are working fine enough for now.

@kodster28 kodster28 closed this May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants