Refactored translation of exception messages

This commit is contained in:
El RIDO
2025-11-19 09:36:08 +01:00
parent 3e6f1733f9
commit 3a23117ebf
24 changed files with 186 additions and 110 deletions

View File

@@ -11,8 +11,8 @@
namespace PrivateBin\Proxy;
use Exception;
use PrivateBin\Configuration;
use PrivateBin\Exception\JsonException;
use PrivateBin\Json;
/**
@@ -90,7 +90,7 @@ abstract class AbstractProxy
try {
$jsonData = Json::decode($data);
} catch (Exception $e) {
} catch (JsonException $e) {
$this->_error = 'Proxy error: Error parsing proxy response. This can be a configuration issue, like wrong or missing config keys.';
$this->logErrorWithClassName('Error calling proxy: ' . $e->getMessage());
return;