You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,7 +22,7 @@ public McpAuthorizationException()
22
22
/// </summary>
23
23
/// <param name="message">The message that describes the error.</param>
24
24
publicMcpAuthorizationException(stringmessage)
25
-
:base(message,McpErrorCode.Unauthorized)
25
+
:base(message,McpErrorCode.InvalidRequest)
26
26
{
27
27
}
28
28
@@ -32,37 +32,29 @@ public McpAuthorizationException(string message)
32
32
/// <param name="message">The message that describes the error.</param>
33
33
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
/// Initializes a new instance of the <see cref="McpAuthorizationException"/> class with a specified error message and error code.
41
41
/// </summary>
42
42
/// <param name="message">The message that describes the error.</param>
43
-
/// <param name="errorCode">The MCP error code. Should be either <see cref="McpErrorCode.Unauthorized"/> or <see cref="McpErrorCode.AuthenticationFailed"/>.</param>
43
+
/// <param name="errorCode">The MCP error code. Should use one of the standard error codes.</param>
thrownewArgumentException($"Error code must be either {nameof(McpErrorCode.Unauthorized)} or {nameof(McpErrorCode.AuthenticationFailed)}",nameof(errorCode));
50
-
}
51
47
}
52
48
53
49
/// <summary>
54
50
/// Initializes a new instance of the <see cref="McpAuthorizationException"/> class with a specified error message, inner exception, and error code.
55
51
/// </summary>
56
52
/// <param name="message">The message that describes the error.</param>
57
53
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
58
-
/// <param name="errorCode">The MCP error code. Should be either <see cref="McpErrorCode.Unauthorized"/> or <see cref="McpErrorCode.AuthenticationFailed"/>.</param>
54
+
/// <param name="errorCode">The MCP error code. Should use one of the standard error codes.</param>
thrownewArgumentException($"Error code must be either {nameof(McpErrorCode.Unauthorized)} or {nameof(McpErrorCode.AuthenticationFailed)}",nameof(errorCode));
0 commit comments