Skip to content

Commit 8e23dae

Browse files
committed
error: allow user and external group ids
The V2 Error group field only accepted header.GroupId, which would lead to validation errors when smpclient received v2 error responses from SMP groups beyond the standard set. This change allows creating ErrorV2 instances for both User Groups defined in the tree (i.e. Intercreate) as well as for User Groups defined outside of the tree.
1 parent c24f6ff commit 8e23dae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smp/error.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pydantic import BaseModel, ConfigDict
99

1010
from smp import message
11-
from smp.header import GroupId
11+
from smp.header import GroupIdField
1212

1313
T = TypeVar("T", bound=IntEnum)
1414

@@ -80,7 +80,7 @@ class Err(BaseModel, Generic[T]):
8080

8181
model_config = ConfigDict(extra="forbid", frozen=True, arbitrary_types_allowed=True)
8282

83-
group: GroupId
83+
group: GroupIdField
8484
rc: T
8585

8686

0 commit comments

Comments
 (0)