-
- All Implemented Interfaces:
public final class ChatErrorKt
-
-
Method Summary
Modifier and Type Method Description final static BooleanisPermanent(ChatError $self)Returns true if an error is a permanent failure instead of a temporary one (broken network, 500, rate limit etc. final static ChatErrorcopyWithMessage(ChatError $self, String message)Copies the original ChatError objects with custom message. final static ThrowableextractCause(ChatError $self)Extracts the cause from ChatError object or null if it's not available. -
-
Method Detail
-
isPermanent
final static Boolean isPermanent(ChatError $self)
Returns true if an error is a permanent failure instead of a temporary one (broken network, 500, rate limit etc.)
A permanent error is an error returned by Stream's API (IE a validation error on the input) Any permanent error will always have a stream error code
Temporary errors are retried. Network not being available is a common example of a temporary error.
See the error codes here https://getstream.io/chat/docs/api_errors_response/?language=js
-
copyWithMessage
final static ChatError copyWithMessage(ChatError $self, String message)
Copies the original ChatError objects with custom message.
- Parameters:
message- The message to replace.
-
extractCause
final static Throwable extractCause(ChatError $self)
Extracts the cause from ChatError object or null if it's not available.
-
-
-
-