File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
AdobeStockImageAdminUi/Model/Asset Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1111use Magento \AdobeStockAssetApi \Model \Asset \Command \LoadByIdsInterface ;
1212use Magento \MediaGalleryApi \Api \GetAssetsByIdsInterface ;
1313use Magento \MediaGalleryApi \Api \Data \AssetInterface ;
14- use Magento \Framework \Exception \LocalizedException ;
1514use Magento \Framework \Reflection \DataObjectProcessor ;
1615
1716/**
@@ -56,17 +55,12 @@ public function __construct(
5655 *
5756 * @param int $adobeId
5857 * @return array
59- * @throws LocalizedException
6058 */
6159 public function execute (int $ adobeId ): array
6260 {
63- try {
64- $ mediaGalleryId = $ this ->getAssetByAdobeId ->execute ([$ adobeId ])[$ adobeId ]->getMediaGalleryId ();
65- $ asset = $ this ->getMediaGalleryAssetsById ->execute ([$ mediaGalleryId ]);
61+ $ mediaGalleryId = $ this ->getAssetByAdobeId ->execute ([$ adobeId ])[$ adobeId ]->getMediaGalleryId ();
62+ $ asset = $ this ->getMediaGalleryAssetsById ->execute ([$ mediaGalleryId ]);
6663
67- return $ this ->objectProcessor ->buildOutputDataArray (current ($ asset ), AssetInterface::class);
68- } catch (\Exception $ e ) {
69- throw new LocalizedException (__ ($ e ->getMessage ()));
70- }
64+ return $ this ->objectProcessor ->buildOutputDataArray (current ($ asset ), AssetInterface::class);
7165 }
7266}
You can’t perform that action at this time.
0 commit comments