added error handling to embeddings
diff --git a/R/gpt3_single_embedding.R b/R/gpt3_single_embedding.R
index 1e475c0..5f4dec0 100644
--- a/R/gpt3_single_embedding.R
+++ b/R/gpt3_single_embedding.R
@@ -40,6 +40,10 @@
                             , httr::add_headers(Authorization = paste("Bearer", api_key))
                             , encode = "json")
 
+  if(request_base$status_code != 200){
+    warning(paste0("Request completed with error. Code: ", request_base$status_code
+                   , ", message: ", request_content$error$message))
+  }
 
   output_base = httr::content(request_base)