mirror of
https://github.com/pion/stun.git
synced 2026-04-22 23:17:19 +08:00
Display the attribute which has the error.
This commit is contained in:
+1
-1
@@ -186,7 +186,7 @@ var ErrAttributeNotFound = errors.New("attribute not found")
|
||||
func (m *Message) Get(t AttrType) ([]byte, error) {
|
||||
v, ok := m.Attributes.Get(t)
|
||||
if !ok {
|
||||
return nil, ErrAttributeNotFound
|
||||
return nil, errors.New("attribute not found " + t.String())
|
||||
}
|
||||
return v.Value, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user