async fn fetch_sentry_json(
        &self,
        query: &SearchQuery,
    ) -> Result<Vec<SearchResult>, SentryError> {
        let response = self
            .client
            .get(query.index_url.clone())
            .header("Accept-Encoding", "identity")
            .header("User-Agent", USER_AGENT)
            .bearer_auth(&query.token)
            .send()
            .await?;

        if response.status().is_success() {
            log::trace!("Success fetching index from Sentry");
            Ok(response.json().await?)
        } else {
            log::warn!("Sentry returned status code {}", response.status());
            Err(SentryError::BadStatusCode(response.status()))
        }
    }
/// Make a request to sentry, parse the result as a JSON SearchResult list.
Make a request to sentry, parse the result as a JSON SearchResult list.
Make a request to sentry parse the result as a JSON SearchResult list .
async fn fetch_sentry_json(
        &self,
        query: &SearchQuery,
    ) -> Result<Vec<SearchResult>, SentryError> {
        let response = self
            .client
            .get(query.index_url.clone())
            .header("Accept-Encoding", "identity")
            .header("User-Agent", USER_AGENT)
            .bearer_auth(&query.token)
            .send()
            .await?;
        if response.status().is_success() {
            log::trace!("Success fetching index from Sentry");
            Ok(response.json().await?)
        } else {
            log::warn!("Sentry returned status code {}", response.status());
            Err(SentryError::BadStatusCode(response.status()))
        }
    }
async fn fetch_sentry_json ( & self , query : & SearchQuery , ) -> Result < Vec < SearchResult > , SentryError > { let response = self . client . get ( query . index_url . clone ( ) ) . header ( " " , " " ) . header ( " " , USER_AGENT ) . bearer_auth ( & query . token ) . send ( ) . await ? ; if response . status ( ) . is_success ( ) { log :: trace ! ( " " ) ; Ok ( response . json ( ) . await ? ) } else { log :: warn ! ( " " response status ( ) ) ; Err ( SentryError :: BadStatusCode ( response . status ( ) ) ) } }
Make a request to sentry, parse the result as a JSON SearchResult list.
Make a request to sentry parse the result as a JSON SearchResult list .
&self
query
&SearchQuery
&self
query
&SearchQuery