Skip to content

Type Alias: ResponseErrorCode

ts
type ResponseErrorCode = LemmyErrorType["error"] | string & object;

Defined in: src/errors.ts:13

Machine-readable error codes a fediverse server may return (e.g. "incorrect_login", "too_many_requests"), exposed on ResponseError.code.

Escape hatch: prefer matching the condition subclasses with instanceof (NotFoundError, RateLimitedError, ...). Codes remain for conditions that don't have a class (the long tail) and for debugging.