File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 33namespace MattJanssen \ApiResponseBundle \Exception ;
44
55use Symfony \Component \HttpFoundation \Response ;
6+ use Symfony \Component \HttpKernel \Exception \HttpExceptionInterface ;
67
78/**
89 * Exception for a Failed API Response
1314 *
1415 * @author Matt Janssen <matt@mattjanssen.com>
1516 */
16- class ApiResponseException extends \Exception implements ApiResponseExceptionInterface
17+ class ApiResponseException extends \Exception implements HttpExceptionInterface, ApiResponseExceptionInterface
1718{
1819 /**
1920 * HTTP Response Status Code
@@ -93,4 +94,24 @@ public function setErrorData($errorData)
9394 {
9495 $ this ->errorData = $ errorData ;
9596 }
97+
98+ /**
99+ * Returns the status code.
100+ *
101+ * @return int An HTTP response status code
102+ */
103+ public function getStatusCode ()
104+ {
105+ return $ this ->getHttpStatusCode ();
106+ }
107+
108+ /**
109+ * Returns response headers.
110+ *
111+ * @return array Response headers
112+ */
113+ public function getHeaders ()
114+ {
115+ return [];
116+ }
96117}
You can’t perform that action at this time.
0 commit comments