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

Internal exceptions aren't surfaced #92

Open
tipa opened this issue Sep 18, 2024 · 0 comments
Open

Internal exceptions aren't surfaced #92

tipa opened this issue Sep 18, 2024 · 0 comments

Comments

@tipa
Copy link

tipa commented Sep 18, 2024

I have hit a case in which a WebDAV server doesn't respond with a valid XML or error code when sending a PROPFIND request, but with an HTML page (and response code 200). When trying to parse the HTML, an exception is thrown in XDocument.Parse. But this exception is caught and awaiting the Propfind method doesn't throw the exception.

public static XDocument TryParse(string text)
{
try
{
return XDocument.Parse(text);
}
catch
{
return null;
}
}

From the PROPFIND response it is not apparent if the server responded with an (invalid) HTML, or with a (valid) empty PROPFIND response

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

No branches or pull requests

1 participant