errors

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoConfig                     = psrpc.NewErrorf(psrpc.InvalidArgument, "missing config")
	ErrInvalidAudioOptions          = psrpc.NewErrorf(psrpc.InvalidArgument, "invalid audio options")
	ErrInvalidVideoOptions          = psrpc.NewErrorf(psrpc.InvalidArgument, "invalid video options")
	ErrInvalidAudioPreset           = psrpc.NewErrorf(psrpc.InvalidArgument, "invalid audio encoding preset")
	ErrInvalidVideoPreset           = psrpc.NewErrorf(psrpc.InvalidArgument, "invalid video encoding preset")
	ErrSourceNotReady               = psrpc.NewErrorf(psrpc.FailedPrecondition, "source encoder not ready")
	ErrUnsupportedDecodeFormat      = psrpc.NewErrorf(psrpc.NotAcceptable, "unsupported format for the source media")
	ErrUnsupportedEncodeFormat      = psrpc.NewErrorf(psrpc.InvalidArgument, "unsupported mime type for encoder")
	ErrUnsupportedURLFormat         = psrpc.NewErrorf(psrpc.InvalidArgument, "unsupported URL type")
	ErrDuplicateTrack               = psrpc.NewErrorf(psrpc.NotAcceptable, "more than 1 track with given media kind")
	ErrUnableToAddPad               = psrpc.NewErrorf(psrpc.Internal, "could not add pads to bin")
	ErrMissingResourceId            = psrpc.NewErrorf(psrpc.InvalidArgument, "missing resource ID")
	ErrInvalidRelayToken            = psrpc.NewErrorf(psrpc.PermissionDenied, "invalid token")
	ErrIngressNotFound              = psrpc.NewErrorf(psrpc.NotFound, "ingress not found")
	ErrServerCapacityExceeded       = psrpc.NewErrorf(psrpc.ResourceExhausted, "server capacity exceeded")
	ErrServerShuttingDown           = psrpc.NewErrorf(psrpc.Unavailable, "server shutting down")
	ErrIngressClosing               = psrpc.NewErrorf(psrpc.Unavailable, "ingress closing")
	ErrMissingStreamKey             = psrpc.NewErrorf(psrpc.InvalidArgument, "missing stream key")
	ErrPrerollBufferReset           = psrpc.NewErrorf(psrpc.Internal, "preroll buffer reset")
	ErrInvalidSimulcast             = psrpc.NewErrorf(psrpc.NotAcceptable, "invalid simulcast configuration")
	ErrSimulcastTranscode           = psrpc.NewErrorf(psrpc.NotAcceptable, "simulcast is not supported when transcoding")
	ErrRoomDisconnected             = psrpc.NewErrorf(psrpc.NotAcceptable, "room disconnected")
	ErrInvalidWHIPRestartRequest    = psrpc.NewErrorf(psrpc.InvalidArgument, "whip restart request was invalid")
	ErrRoomDisconnectedUnexpectedly = RetryableError{psrpc.NewErrorf(psrpc.Unavailable, "room disconnected unexpectedly")}
)

Functions

func As added in v0.9.0

func As(err error, target any) bool

func ErrCouldNotParseConfig

func ErrCouldNotParseConfig(err error) psrpc.Error

func ErrFromGstFlowReturn

func ErrFromGstFlowReturn(ret gst.FlowReturn) psrpc.Error

func ErrHttpRelayFailure added in v0.9.0

func ErrHttpRelayFailure(statusCode int) psrpc.Error

func ErrUnsupportedDecodeMimeType added in v1.1.0

func ErrUnsupportedDecodeMimeType(mimeType string) psrpc.Error

func ErrorToGstFlowReturn added in v1.0.0

func ErrorToGstFlowReturn(err error) gst.FlowReturn

func Is added in v0.9.0

func Is(err, target error) bool

func New

func New(err string) error

Types

type HTTPError added in v1.6.0

type HTTPError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func NewHTTPError added in v1.6.0

func NewHTTPError(statusCode int, err error) *HTTPError

func NewHTTPErrorFromResponse added in v1.6.0

func NewHTTPErrorFromResponse(resp *http.Response) *HTTPError

NewHTTPErrorFromResponse builds an HTTPError from a failed HTTP response. The error message is derived from the first maxErrorBodyLen characters of the response body, falling back to a generic message when the body is empty.

func (*HTTPError) Error added in v1.6.0

func (e *HTTPError) Error() string

func (*HTTPError) Unwrap added in v1.6.0

func (e *HTTPError) Unwrap() error

type RetryableError added in v1.4.0

type RetryableError struct {
	// contains filtered or unexported fields
}

func (RetryableError) Code added in v1.4.0

func (err RetryableError) Code() psrpc.ErrorCode

func (RetryableError) Error added in v1.4.0

func (err RetryableError) Error() string

func (RetryableError) GRPCStatus added in v1.4.0

func (err RetryableError) GRPCStatus() *status.Status

func (RetryableError) ToHttp added in v1.4.0

func (err RetryableError) ToHttp() int

func (RetryableError) Unwrap added in v1.4.0

func (err RetryableError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL