Class ErrorEvent
-
- All Implemented Interfaces:
public final class ErrorEvent
Returned when an error occurs, which could be a client problem or a server problem. Most errors are recoverable and the session will stay open, we recommend to implementors to monitor and log error messages by default.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ErrorEvent.Builder
A builder for ErrorEvent.
public final class
ErrorEvent.Error
Details of the error.
-
Method Summary
Modifier and Type Method Description final ErrorEvent.Error
error()
Details of the error. final String
eventId()
The unique ID of the server event. final JsonValue
_type()
The event type, must be error
.final JsonField<ErrorEvent.Error>
_error()
Returns the raw JSON value of error. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final Map<String, JsonValue>
_additionalProperties()
final ErrorEvent.Builder
toBuilder()
final ErrorEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ErrorEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ErrorEvent. -
-
Method Detail
-
error
final ErrorEvent.Error error()
Details of the error.
-
_type
final JsonValue _type()
The event type, must be
error
.Expected to always return the following:
JsonValue.from("error")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_error
final JsonField<ErrorEvent.Error> _error()
Returns the raw JSON value of error.
Unlike error, this method doesn't throw if the JSON field has an unexpected type.
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ErrorEvent.Builder toBuilder()
-
validate
final ErrorEvent validate()
-
builder
final static ErrorEvent.Builder builder()
Returns a mutable builder for constructing an instance of ErrorEvent.
The following fields are required:
.error() .eventId()
-
-
-
-