Enum ark_api_ffi::ErrorCode
source · [−]#[non_exhaustive]
#[repr(u32)]
pub enum ErrorCode {
Success,
ApiNotAvailable,
InternalError,
InvalidArguments,
NotFound,
Unavailable,
HttpRequestFailed,
}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
Success - there was no error and the operation completed successfully
ApiNotAvailable
API not available.
Typically happens if a module calls an API it has not specified that it requires
InternalError
Internal error - something went wrong on in the Ark host
InvalidArguments
Invalid arguments - the inputs to the called API function were not valid
NotFound
Resource not found - used by APIs to indicate a requested resource can’t be found
Unavailable
The API or resource is currently not available
HttpRequestFailed
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.