fn output_error(&self, error: &reqwest::Error) {
        error!(
            "Error occurred from sent request. \
             Error: {}",
            error
        );
        trace!("Url where error occurred: {:#?}", error.url());

        if let Some(status) = error.status() {
            let code = status.as_u16();
            trace!("The response code from the server was: {}", code);

            match code {
                500 => {
                    error!(
                        "There was an error that happened internally in the servers, \
                         please try using the downloader later until the issue is solved."
                    );
                }
                503 => {
                    error!(
                        "Server could not handle the request, or the downloader has \
                         exceeded the rate-limit. Contact the developer immediately about this \
                         issue."
                    );
                }
                403 => {
                    error!(
                        "The client was forbidden from accessing the api, contact the \
                         developer immediately if this error occurs."
                    );
                }
                421 => {
                    error!(
                        "The user is throttled, thus the request is unsuccessful. \
                         Contact the developer immediately if this error occurs."
                    );
                }
                _ => {
                    error!("Response code couldn't be posted...");
                }
            }
        }

        emergency_exit("To prevent the program from crashing, it will do an emergency exit.");
    }
/// If a request failed, this will output what type of error it is before exiting.
If a request failed, this will output what type of error it is before exiting.
If a request failed this will output what type of error it is before exiting .
fn output_error(&self, error: &reqwest::Error) {
        error!(
            "Error occurred from sent request. \
             Error: {}",
            error
        );
        trace!("Url where error occurred: {:#?}", error.url());
        if let Some(status) = error.status() {
            let code = status.as_u16();
            trace!("The response code from the server was: {}", code);
            match code {
                500 => {
                    error!(
                        "There was an error that happened internally in the servers, \
                         please try using the downloader later until the issue is solved."
                    );
                }
                503 => {
                    error!(
                        "Server could not handle the request, or the downloader has \
                         exceeded the rate-limit. Contact the developer immediately about this \
                         issue."
                    );
                }
                403 => {
                    error!(
                        "The client was forbidden from accessing the api, contact the \
                         developer immediately if this error occurs."
                    );
                }
                421 => {
                    error!(
                        "The user is throttled, thus the request is unsuccessful. \
                         Contact the developer immediately if this error occurs."
                    );
                }
                _ => {
                    error!("Response code couldn't be posted...");
                }
            }
        }
        emergency_exit("To prevent the program from crashing, it will do an emergency exit.");
    }
fn output_error ( & self , error : & reqwest :: Error ) { error ! ( " \
 " error ) ; trace ! ( " " error url ( ) ) ; if let Some ( status ) = error . status ( ) { let code = status . as_u16 ( ) ; trace ! ( " " code ) ; match code { 500 => { error ! ( " \
 " ) ; } 503 => { error ! ( " \
 \
 " ) ; } 403 => { error ! ( " \
 " ) ; } 421 => { error ! ( " \
 " ) ; } _ => { error ! ( " " ) ; } } } emergency_exit ( " " ) ; }
If a request failed, this will output what type of error it is before exiting.
If a request failed this will output what type of error it is before exiting .
&self
error
&reqwest::Error
&self
error
&reqwest::Error