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

Enhance URI parsing exceptions #2126

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Mar 4, 2022

Motivation:

Provide more information in URI exceptions to help users understand the
issue.

Modifications:

  • Enhance messages with more context;

Result:

Messages provide more context without leaking the full URI because it
may contain sensitive info in query or path params.

Example:

  • before: duplicate/invalid host
  • after: Invalid URI format: duplicate or invalid host. Already parsed host: localhost, but found ':' character at index 23. Total URI length: 45

Motivation:

Provide more information in URI exceptions to help users understand the
issue.

Modifications:

- Enhance messages with more context;

Result:

Messages provide more context without leaking the full URI because it
may contain sensitive info in query or path params.
@idelpivnitskiy idelpivnitskiy self-assigned this Mar 4, 2022
Copy link
Contributor

@tkountis tkountis left a comment

Choose a reason for hiding this comment

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

Change looks ok. Can you please include error samples (before / after) of the change in the description?

@idelpivnitskiy
Copy link
Member Author

I've included one example in the description

@idelpivnitskiy idelpivnitskiy merged commit 3dbd25a into apple:main Mar 7, 2022
@idelpivnitskiy idelpivnitskiy deleted the uri branch March 7, 2022 15:54
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.

2 participants