Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Update timeout response code to 408 in proxy

ozanarmagane7887c5efa78
diff --git a/src/http_proxy.cpp b/src/http_proxy.cpp
index eb562849..4ed4db5a 100644
--- a/src/http_proxy.cpp
+++ b/src/http_proxy.cpp
@@ -44,12 +44,12 @@ http_proxy_res_t HttpProxy::send(const std::string& url, const std::string& meth
auto res = call(url, method, body, headers);
- if(res.status_code == 500){
+ if(res.status_code == 408){
// retry
res = call(url, method, body, headers);
}
- if(res.status_code == 500){
+ if(res.status_code == 408){
nlohmann::json j;
j["message"] = "Server error on remote server. Please try again later.";
res.body = j.dump();
@@ -57,7 +57,7 @@ http_proxy_res_t HttpProxy::send(const std::string& url, const std::string& meth
// add to cache
- if(res.status_code != 500){
+ if(res.status_code != 408){
cache.insert(key, res);
}