Skip to content

Commit

Permalink
magento/graphql-ce#985: Remove unnecessary exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
atwixfirster committed Oct 9, 2019
1 parent 68c48d5 commit cde217a
Showing 1 changed file with 0 additions and 10 deletions.
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);
}
}
}

0 comments on commit cde217a

Please sign in to comment.