mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
MatchRoomSubscription: include room ID in err msg
This commit is contained in:
parent
4e387ca9f0
commit
790ae22726
@ -222,11 +222,11 @@ func MatchRoomSubscription(roomID string, matchers ...RoomMatcher) RespMatcher {
|
||||
return func(res *sync3.Response) error {
|
||||
room, ok := res.Rooms[roomID]
|
||||
if !ok {
|
||||
return fmt.Errorf("MatchRoomSubscription: want sub for %s but it was missing", roomID)
|
||||
return fmt.Errorf("MatchRoomSubscription[%s]: want sub but it was missing", roomID)
|
||||
}
|
||||
for _, m := range matchers {
|
||||
if err := m(room); err != nil {
|
||||
return fmt.Errorf("MatchRoomSubscription: %s", err)
|
||||
return fmt.Errorf("MatchRoomSubscription[%s]: %s", roomID, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user