mirror of
https://github.com/beestat/app.git
synced 2026-05-13 10:52:29 -04:00
Made SmartyStreets failures not throw errors for #271
I still need to address the business side of things, though. For now if my subscription runs out or SmartyStreets returns garbage beestat will ignore the error and comparisons just won't work properly. Any issue caused by this will auto-resolve as soon as possible since the API call will retry automatically.
This commit is contained in:
@@ -75,13 +75,8 @@ class external_api extends cora\api {
|
||||
curl_setopt($curl_handle, CURLINFO_HEADER_OUT, true);
|
||||
}
|
||||
|
||||
$should_cache = (
|
||||
$this::$cache === true &&
|
||||
$this::should_cache($arguments) === true
|
||||
);
|
||||
|
||||
// Check the cache
|
||||
if ($should_cache === true) {
|
||||
if ($this::$cache === true) {
|
||||
$cache_key = $this->generate_cache_key($arguments);
|
||||
$cache_entry = $this->get_cache_entry($cache_key);
|
||||
} else {
|
||||
@@ -116,7 +111,10 @@ class external_api extends cora\api {
|
||||
$this->log_mysql($curl_response);
|
||||
}
|
||||
|
||||
if($should_cache === true) {
|
||||
if(
|
||||
$this::$cache === true &&
|
||||
$this::should_cache($arguments, $curl_response, $this->curl_info) === true
|
||||
) {
|
||||
$this->create_update_cache_entry($cache_key, $curl_response);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user