Skip to content

Commit

Permalink
started error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ericapywang committed Jun 7, 2024
1 parent 35fbed4 commit d0689b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions pinecone_sdk/src/pinecone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ impl Pinecone {
additional_headers,
source_tag,
};

let user_agent = get_user_agent(&config);


let user_agent = get_user_agent(&config);

let openapi_config = Configuration {
Expand Down
6 changes: 6 additions & 0 deletions pinecone_sdk/src/utils/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ pub enum PineconeError {

#[snafu(display("Failed to parse headers: {}", json_error))]
InvalidHeadersError { json_error: serde_json::Error },

#[snafu(display("Invalid region."))]
InvalidRegionError,

#[snafu(display("Invalid cloud."))]
InvalidCloudError,
}

0 comments on commit d0689b0

Please sign in to comment.