HatangException
class HatangException(val code: String, val message: String, val status: Int? = null, cause: Throwable? = null) : Exception
An error reported by the Hatang gateway (REST or socket) or by the SDK itself.
code is the stable slug the gateway uses (invalid_app_key, rate_limit_exceeded, validation_error, ...). SDK-side failures use network_error, timeout, closed and decode_error. message is English and meant for logs; the UI translates code instead.
Properties
Link copied to clipboard
The app key is missing, wrong or revoked: no retry will help.
Link copied to clipboard
The gateway asked the client to slow down.
Link copied to clipboard
The visitor token is no longer accepted (reset elsewhere, revoked).
Link copied to clipboard
Worth retrying later (transport trouble, rate limits, server errors).