File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 77namespace SplashLab \CorsRequests \Plugin ;
88
99use Magento \Framework \Webapi \Request ;
10+ use Magento \Framework \Exception \InputException ;
1011
1112/**
1213 * Class CorsRequestOptionsPlugin
@@ -22,13 +23,13 @@ class CorsRequestOptionsPlugin
2223 *
2324 * @param Request $subject
2425 * @return void
25- * @throws \Magento\Framework\Exception\ InputException
26+ * @throws InputException
2627 */
2728 public function aroundGetHttpMethod (
2829 Request $ subject
2930 ) {
3031 if (!$ subject ->isGet () && !$ subject ->isPost () && !$ subject ->isPut () && !$ subject ->isDelete () && !$ subject ->isOptions ()) {
31- throw new \ Magento \ Framework \ Exception \ InputException (new Phrase ('Request method is invalid. ' ));
32+ throw new InputException (__ ('Request method is invalid. ' ));
3233 }
3334 return $ subject ->getMethod ();
3435 }
You can’t perform that action at this time.
0 commit comments