Commit 75c84bf
committed
fix: prevent MCPError from marking data as set when None
MCPError.__init__ always passed data=data to ErrorData(), even when
data was None (the default). This marked data as 'set' in Pydantic's
model_fields_set, causing exclude_unset=True to emit 'data': null on
the wire. Fix by only passing data when non-None.1 parent 43ee2d9 commit 75c84bf
File tree
1 file changed
+4
-1
lines changed1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
0 commit comments