#[non_exhaustive]#[repr(u32)]pub enum ErrorCode {
Success = 0,
ApiNotAvailable = 2,
InternalError = 4,
InvalidArguments = 5,
NotFound = 6,
Unavailable = 7,
HttpRequestFailed = 8,
}
Expand description
Error return codes for API functions.
Note that there is an ErrorCode::Success
,
so the presence of ErrorCode
does NOT signify an error.
Do NOT use this type in the public interface of ark-api
. Use idiomatic Rust error enum or ark_api::Error
instead
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Success = 0
Success - there was no error and the operation completed successfully
ApiNotAvailable = 2
API not available.
Typically happens if a module calls an API it has not specified that it requires
InternalError = 4
Internal error - something went wrong on in the Ark host
InvalidArguments = 5
Invalid arguments - the inputs to the called API function were not valid
NotFound = 6
Resource not found - used by APIs to indicate a requested resource can’t be found
The API or resource is currently not available
HttpRequestFailed = 8
HTTP request failed due to external server error - something went wrong when communicating with the remote server
This can happen when sending a HTTP request to a server that is unavailable, if DNS lookup fails, or other server related issues.