mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Added exception handling for "User cannot access thermostat..." error
This commit is contained in:
parent
d1aa64dba6
commit
1c3002644c
@ -248,6 +248,16 @@ class ecobee extends external_api {
|
|||||||
$this->log_mysql($curl_response, true);
|
$this->log_mysql($curl_response, true);
|
||||||
}
|
}
|
||||||
throw new cora\exception('Illegal instant due to time zone offset transition.', 10509, false, null, false);
|
throw new cora\exception('Illegal instant due to time zone offset transition.', 10509, false, null, false);
|
||||||
|
} else if (
|
||||||
|
isset($response['status']['message']) === true &&
|
||||||
|
stripos($response['status']['message'], 'User cannot access thermostat with id') !== false
|
||||||
|
) {
|
||||||
|
// Processing error. User cannot access thermostat with id ...
|
||||||
|
// Not sure why this happens
|
||||||
|
if($this::$log_mysql !== 'all') {
|
||||||
|
$this->log_mysql($curl_response, true);
|
||||||
|
}
|
||||||
|
throw new cora\exception('User cannot access thermostat.', 10510, false, null, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isset($response['status']) === true && $response['status']['code'] !== 0) {
|
else if (isset($response['status']) === true && $response['status']['code'] !== 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user