errors.go 1.2 KB

123456789101112131415161718192021222324
  1. package datachannel
  2. import "errors"
  3. var (
  4. // ErrDataChannelMessageTooShort means that the data isn't long enough to be a valid DataChannel message
  5. ErrDataChannelMessageTooShort = errors.New("DataChannel message is not long enough to determine type")
  6. // ErrInvalidPayloadProtocolIdentifier means that we got a DataChannel messages with a Payload Protocol Identifier
  7. // we don't know how to handle
  8. ErrInvalidPayloadProtocolIdentifier = errors.New("DataChannel message Payload Protocol Identifier is value we can't handle")
  9. // ErrInvalidChannelType means that the remote requested a channel type that we don't support
  10. ErrInvalidChannelType = errors.New("invalid Channel Type")
  11. // ErrInvalidMessageType is returned when a DataChannel Message has a type we don't support
  12. ErrInvalidMessageType = errors.New("invalid Message Type")
  13. // ErrExpectedAndActualLengthMismatch is when the declared length and actual length don't match
  14. ErrExpectedAndActualLengthMismatch = errors.New("expected and actual length do not match")
  15. // ErrUnexpectedDataChannelType is when a message type does not match the expected type
  16. ErrUnexpectedDataChannelType = errors.New("expected and actual message type does not match")
  17. )