Table of Contents

Class PlayitApiException

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Error returned by the Playit API (status != success).

public class PlayitApiException : Exception, ISerializable
Inheritance
PlayitApiException
Implements
Inherited Members

Constructors

PlayitApiException(string?, string)

public PlayitApiException(string? type, string message)

Parameters

type string
message string

Properties

ErrorType

public string? ErrorType { get; }

Property Value

string

IsAuthError

Whether Playit refused the key, as opposed to failing for some other reason.

public bool IsAuthError { get; }

Property Value

bool

Remarks

Only the first spelling used to count. Playit answers a rejected key as auth in some places and as a named error such as InvalidAgentKey in others, and the second kind was treated as "something else went wrong" — which stopped the client from trying the next way of presenting the same key, the one that would have worked.

IsReadOnlyRefusal

The key is valid, but it can only read: Playit's answer to a change made with the key of an agent the user installed themselves.

public bool IsReadOnlyRefusal { get; }

Property Value

bool

Remarks

Measured, not assumed: with the secret_key from playit.toml, /agents/rundata answers and both /tunnels/rename and /tunnels/delete come back {"type":"auth","message":"NotAllowedWithReadOnly"} under every way of sending the key.