TwiftError - daneden/Twift GitHub Wiki
TwiftError
The error types relating to Twift instances and methods.
public enum TwiftError: Error
Inheritance
Error
, LocalizedError
Enumeration Cases
WrongAuthenticationType
This error is thrown when there is an attempt to make a request without the right credentials (usually either a bearer token or client & user credentials)
case WrongAuthenticationType(needs: Twift.AuthenticationTypeRepresentation)
OAuthTokenError
This error is thrown when there was a problem obtaining an OAuth request token from Twitter. This usually happens if the callback URL is invalid or not allowed on the client application.
case OAuthTokenError
UnknownError
This error is thrown only when no other error type adequately matches the encountered problem.
case UnknownError(_ context: Any? = nil)
RangeOutOfBoundsError
This error is thrown when the called function expected an integer within a specified range but was passed a value outside that range.
case RangeOutOfBoundsError(min: Int = 1, max: Int = 1000, fieldName: String, actual: Int)
Properties
errorDescription
The human-readable description for the error
public var errorDescription: String?