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 7
7
namespace SplashLab \CorsRequests \Plugin ;
8
8
9
9
use Magento \Framework \Webapi \Request ;
10
+ use Magento \Framework \Exception \InputException ;
10
11
11
12
/**
12
13
* Class CorsRequestOptionsPlugin
@@ -22,13 +23,13 @@ class CorsRequestOptionsPlugin
22
23
*
23
24
* @param Request $subject
24
25
* @return void
25
- * @throws \Magento\Framework\Exception\ InputException
26
+ * @throws InputException
26
27
*/
27
28
public function aroundGetHttpMethod (
28
29
Request $ subject
29
30
) {
30
31
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. ' ));
32
33
}
33
34
return $ subject ->getMethod ();
34
35
}
You can’t perform that action at this time.
0 commit comments