mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Expose ErrUnknownCandidateTyp
Expose this error so pion/webrtc can handle gracefully. rfc8839#section-5.1 specifies that a WebRTC Agent MUST ignore any name/value pairs it doesn't understand. Relates to pion/webrtc#1949
This commit is contained in:
+1
-1
@@ -496,5 +496,5 @@ func UnmarshalCandidate(raw string) (Candidate, error) {
|
||||
default:
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("%w (%s)", errUnknownCandidateTyp, typ)
|
||||
return nil, fmt.Errorf("%w (%s)", ErrUnknownCandidateTyp, typ)
|
||||
}
|
||||
|
||||
@@ -109,6 +109,9 @@ var (
|
||||
// ErrTCPRemoteAddrAlreadyExists indicates we already have the connection with same remote addr.
|
||||
ErrTCPRemoteAddrAlreadyExists = errors.New("conn with same remote addr already exists")
|
||||
|
||||
// ErrUnknownCandidateTyp indicates that a candidate had a unknown type value.
|
||||
ErrUnknownCandidateTyp = errors.New("unknown candidate typ")
|
||||
|
||||
errSendPacket = errors.New("failed to send packet")
|
||||
errAttributeTooShortICECandidate = errors.New("attribute not long enough to be ICE candidate")
|
||||
errParseComponent = errors.New("could not parse component")
|
||||
@@ -116,7 +119,6 @@ var (
|
||||
errParsePort = errors.New("could not parse port")
|
||||
errParseRelatedAddr = errors.New("could not parse related addresses")
|
||||
errParseTypType = errors.New("could not parse typtype")
|
||||
errUnknownCandidateTyp = errors.New("unknown candidate typ")
|
||||
errGetXorMappedAddrResponse = errors.New("failed to get XOR-MAPPED-ADDRESS response")
|
||||
errConnectionAddrAlreadyExist = errors.New("connection with same remote address already exists")
|
||||
errReadingStreamingPacket = errors.New("error reading streaming packet")
|
||||
|
||||
Reference in New Issue
Block a user