Skip to content

Commit f022f1a

Browse files
committed
fix: update error message handling in protocol creation
1 parent 1d144fe commit f022f1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/protocols_io_mcp/tools/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async def create_protocol(
225225
"""
226226
response_create_blank_protocol = await helpers.access_protocols_io_resource("POST", f"/v3/protocols/{uuid.uuid4().hex}", {"type_id": 1})
227227
if response_create_blank_protocol["status_code"] != 0:
228-
return ErrorMessage.from_string(response_create_blank_protocol["status_text"])
228+
return ErrorMessage.from_string(response_create_blank_protocol["error_message"])
229229
protocol = await Protocol.from_protocol_id(response_create_blank_protocol["protocol"]["id"])
230230
data = {"title": title, "description": description}
231231
response_update_protocol = await helpers.access_protocols_io_resource("PUT", f"/v4/protocols/{protocol.id}", data)

0 commit comments

Comments
 (0)