#[non_exhaustive]pub enum SFError {
InvalidRequest(&'static str),
EmptyResponse,
ConnectionError,
ParsingError(&'static str, String),
ServerError(String),
UnsupportedVersion(u32),
TooShortResponse {
name: &'static str,
pos: usize,
array: String,
},
}
Expand description
An error, that occurred during the communication (sending/receiving/parsing) of requests to the S&F server
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRequest(&'static str)
Whatever you were trying to send was not possible to send. This is either our issue when you were doing something normal, or you were sending invalid stuff, like a SSO login on a normal logged in character
EmptyResponse
The server replied with an empty response. This could have a range of reasons. Could be a bad request, not logged in, or something else
ConnectionError
There was some error encountered when sending data to the server. Most likely the server, or your connection is down
ParsingError(&'static str, String)
Whatever the server send back was invalid. Could be because of features not yet supported, or a bug in the API
ServerError(String)
The server responded with an error. If you are already logged in, this is likely recoverable, i.e you are able to reuse your session. You should just not resend the same command, as the server had some error with it. Most likely that you were not allowed to do your action (spend money you don’t have, etc.)
UnsupportedVersion(u32)
The server version is newer, than the limit set in the server communication
TooShortResponse
The server responded with a response, that was too short