Skip to content

The CreateAsync method of McpClient should document HttpRequestException #1094

@mikekistler

Description

@mikekistler

Describe the bug

CreateAsync will throw an HttpRequestException if there is a problem connecting to the MCP server over an HTTP transport. This should be documented.

To Reproduce

Attempt to connect to an MCP server that requires authentication but do not supply credentials.

Expected behavior

The expected behavior is an HttpRequestException, so this should be documented on CreateAsync.

Logs
If applicable, add logs to help explain your problem.

Additional context

In addition to simply documenting that CreateAsync may throw this exception, further explanation should be provided in the remarks for the Unauthorized case, that the server requires authorization and that credentials must be supplied in the Oauth property of the Transport.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions