Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

magento/graphql-ce#985: Remove unnecessary exceptions #995

Merged
merged 1 commit into from
Oct 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@

use Magento\Customer\Model\AuthenticationInterface;
use Magento\Framework\Exception\InvalidEmailOrPasswordException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\State\UserLockedException;
use Magento\Framework\GraphQl\Exception\GraphQlAuthenticationException;
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;

/**
* Check customer password
Expand All @@ -41,8 +37,6 @@ public function __construct(
* @param string $password
* @param int $customerId
* @throws GraphQlAuthenticationException
* @throws GraphQlInputException
* @throws GraphQlNoSuchEntityException
*/
public function execute(string $password, int $customerId)
{
Expand All @@ -52,10 +46,6 @@ public function execute(string $password, int $customerId)
throw new GraphQlAuthenticationException(__($e->getMessage()), $e);
} catch (UserLockedException $e) {
throw new GraphQlAuthenticationException(__($e->getMessage()), $e);
} catch (NoSuchEntityException $e) {
throw new GraphQlNoSuchEntityException(__($e->getMessage()), $e);
} catch (LocalizedException $e) {
throw new GraphQlInputException(__($e->getMessage()), $e);
}
}
}