Api should catch encryption exception
Return JSON style response rather than throwing an exception.
Sentry Issue: ENGINE-1W
Exception: Could not decrypt private key
File "/Core/Messenger/Encryption/OpenSSL.php", line 113, in Minds\Core\Messenger\Encryption\OpenSSL::unlockPrivateKey
throw new \Exception('Could not decrypt private key');
File "/Core/Messenger/Keystore.php", line 56, in Minds\Core\Messenger\Keystore::unlockPrivateKey
self::$tmpPrivateKey = $this->handler->unlockPrivateKey($this->getPrivateKey(), $password, $new_password);
File "/Controllers/api/v2/messenger/keys.php", line 91, in Minds\Controllers\api\v2\messenger\keys::post
$keystore->unlockPrivateKey($_POST['password'], $unlockPassword);
File "/Api/Factory.php", line 90, in Minds\Api\Factory::build
return $handler->$method($pages);
File "/Controllers/api/api.php", line 81, in Minds\Controllers\api\api::post
return Factory::build($pages, $this->request, $this->response);
...
(2 additional frame(s) were not displayed)
Related merge requests
1
added scoped labels
added scoped labels
added scoped label
assigned to @benhayward.ben
changed time estimate to 1h
added scoped label and automatically removed label
added scoped label and automatically removed label
changed the description
added scoped label and automatically removed label
mentioned in commit 8781fc1a
mentioned in merge request !392 (merged)
added 30m of time spent at 2019-11-07
added scoped label and automatically removed label
mentioned in commit 658fe953
mentioned in commit 8ac737a9
closed
Please register or sign in to reply