Rename Error to MCPError (#44)
* Rename Error to MCPError * Conform MCPError to Swift.Error * Use unqualified Error instead of Swift.Error * Use unqualified MCPError instead of MCP.MCPError * Rename file back to Error.swift * Introduce top-level MCP namespace with nested Error typealias to provide deprecation notice for existing usage of MCP.Error * Fix markup for MCP enum warning
This commit is contained in:
parent
a9bcbf9ad9
commit
09da2a1c01
1 changed files with 108 additions and 88 deletions
|
|
@ -43,7 +43,7 @@ struct ResponseTests {
|
|||
@Test("Error response initialization and encoding")
|
||||
func testErrorResponse() throws {
|
||||
let id: ID = "test-id"
|
||||
let error = MCP.Error.parseError(nil)
|
||||
let error = MCPError.parseError(nil)
|
||||
let response = Response<TestMethod>(id: id, error: error)
|
||||
|
||||
let encoder = JSONEncoder()
|
||||
|
|
@ -65,7 +65,7 @@ struct ResponseTests {
|
|||
@Test("Error response with detail")
|
||||
func testErrorResponseWithDetail() throws {
|
||||
let id: ID = "test-id"
|
||||
let error = MCP.Error.parseError("Invalid syntax")
|
||||
let error = MCPError.parseError("Invalid syntax")
|
||||
let response = Response<TestMethod>(id: id, error: error)
|
||||
|
||||
let encoder = JSONEncoder()
|
||||
|
|
|
|||
Loading…
Reference in a new issue