Skip to content

Commit

Permalink
error: allow user and external group ids
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sam-golioth committed Feb 11, 2025
1 parent 320a46d commit aa0a77c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smp/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pydantic import BaseModel, ConfigDict

from smp import message
from smp.header import GroupId
from smp.header import GroupIdField

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

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

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

group: GroupId
group: GroupIdField
rc: T


Expand Down

0 comments on commit aa0a77c

Please sign in to comment.