diff --git a/request_8hpp_source.html b/request_8hpp_source.html index 00ae58be..442e6f1a 100644 --- a/request_8hpp_source.html +++ b/request_8hpp_source.html @@ -264,37 +264,38 @@
224 }
225 catch (const nlohmann::json::parse_error &e)
226 {
-
227 lib::log::debug("JSON: {}", data);
-
228 return lib::result<void *>::fail(e.what());
-
229 }
-
230 catch (const std::exception &e)
-
231 {
-
232 return lib::result<void *>::fail(e.what());
-
233 }
-
234 }
-
235
-
236 static auto parse_error_message(const std::string &data) -> std::string
-
237 {
-
238 try
-
239 {
-
240 const nlohmann::json json = nlohmann::json::parse(data);
-
241 return lib::spt::error::is(json)
-
242 ? lib::spt::error::error_message(json)
-
243 : data;
-
244 }
-
245 catch (const std::exception &e)
-
246 {
-
247 lib::log::error("Failed to parse error message: {}", e.what());
-
248 return data;
-
249 }
-
250 }
-
251
-
252 // Until all requests are moved to here
-
253 friend class api;
-
254 };
+
227 log::debug("Failed to parse json: {}", e.what());
+
228 log::debug("JSON: {}", data);
+
229 return result<void *>::ok(nullptr);
+
230 }
+
231 catch (const std::exception &e)
+
232 {
+
233 return lib::result<void *>::fail(e.what());
+
234 }
+
235 }
+
236
+
237 static auto parse_error_message(const std::string &data) -> std::string
+
238 {
+
239 try
+
240 {
+
241 const nlohmann::json json = nlohmann::json::parse(data);
+
242 return lib::spt::error::is(json)
+
243 ? lib::spt::error::error_message(json)
+
244 : data;
+
245 }
+
246 catch (const std::exception &e)
+
247 {
+
248 lib::log::error("Failed to parse error message: {}", e.what());
+
249 return data;
+
250 }
+
251 }
+
252
+
253 // Until all requests are moved to here
+
254 friend class api;
+
255 };
-
255 }
-
256}
+
256 }
+
257}
lib::http_client
Definition httpclient.hpp:21
lib::json
Definition json.hpp:17
lib::log::debug
static void debug(const Format &fmt, const Arg &arg, Args &&... args)
Definition log.hpp:78