Skip to content

Commit 3586e38

Browse files
committed
Throw UnsupportedRequestMethod instead
1 parent 2f476e2 commit 3586e38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WaterPipe/WaterPipe.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace ElementaryFramework\WaterPipe;
3434

35-
use ElementaryFramework\WaterPipe\Exceptions\InternalServerErrorException;
35+
use ElementaryFramework\WaterPipe\Exceptions\UnsupportedRequestMethodException;
3636
use ElementaryFramework\WaterPipe\Exceptions\NotFoundErrorException;
3737
use ElementaryFramework\WaterPipe\HTTP\Request\Request;
3838
use ElementaryFramework\WaterPipe\HTTP\Request\RequestMethod;
@@ -358,7 +358,7 @@ private function _executeRequest()
358358
case RequestMethod::UNKNOWN:
359359
if (isset($this->_errorsRegistry[500]))
360360
return $this->_executeAction($this->_errorsRegistry[500]);
361-
else throw new InternalServerErrorException();
361+
else throw new UnsupportedRequestMethodException();
362362

363363
case RequestMethod::GET:
364364
$registry = $this->_getRequestRegistry;

0 commit comments

Comments
 (0)