Contents

ProtocolException

An exception response from a media service.

Declaration

object ProtocolException

Properties

NameTypeDescription
methodNamestring

The name of the method the service is processing when it encounters the exception.

methodIndexuint32

The index within the request’s array of Invocation objects that the service is processing when it encounters the exception.

codeint64

The identifier for this exception.

reason RequiredProtocolExceptionReason

The type of exception the service encounters.

retryWithDelayfloat

The timespan, in seconds, the client needs to wait before retrying the request.

trace[string]

Debugging backtraces or other information. Production services must not provide this information. Clients without an enabled debug setting discard this data.

Discussion

You can define a mapping of exception code values that’s meaningful for your service. The client logs these exception codes.

The client doesn’t retry if the retryWithDelay value is negative or absent. If the value is greater than 5 seconds, the client may not retry so it can preserve the real-time interaction with the user.

Include the methodName and methodIndex whenever the reason is unsupported, unauthorized, invalid, or busy. For other reason values, these properties may help diagnose issues, but aren’t a requirement.

See Also

Exceptions