diff --git a/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteOtp.php b/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteOtp.php index 686ae8f..1f9effa 100644 --- a/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteOtp.php +++ b/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteOtp.php @@ -7,6 +7,7 @@ use Socialbox\Classes\Configuration; use Socialbox\Classes\Cryptography; use Socialbox\Enums\StandardError; + use Socialbox\Exceptions\CryptographyException; use Socialbox\Exceptions\DatabaseOperationException; use Socialbox\Exceptions\Standard\InvalidRpcArgumentException; use Socialbox\Exceptions\Standard\StandardRpcException; @@ -70,6 +71,10 @@ return $rpcRequest->produceError(StandardError::FORBIDDEN, 'The provided password is incorrect'); } } + catch(CryptographyException $e) + { + throw new StandardRpcException($e->getMessage(), StandardError::CRYPTOGRAPHIC_ERROR, $e); + } catch(DatabaseOperationException $e) { throw new StandardRpcException('Failed to verify password due to an internal exception', StandardError::INTERNAL_SERVER_ERROR, $e);