File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ public function retrieveResponse(
2828 throw new HttpTokenResponseException (
2929 $ msg . $ http ->error . ' [HTTP ' . $ http ->status . '] ' ,
3030 $ http ->status ,
31- $ http ->error
31+ $ http ->error ,
32+ $ http ->resp_body
3233 );
3334 }
3435
Original file line number Diff line number Diff line change @@ -11,24 +11,28 @@ class HttpTokenResponseException extends TokenResponseException
1111{
1212 protected $ httpStatusCode = 0 ;
1313 protected $ httpErrorMessage = "" ;
14+ protected $ httpRespBody = "" ;
1415
1516 /**
1617 * @param string $message
1718 * @param int $httpStatusCode
1819 * @param string httpErrorMessage
20+ * @param mixed httpRespBody
1921 * @param int $code
2022 * @param \Throwable|null $previous
2123 */
2224 public function __construct (
2325 $ message = "" ,
2426 $ httpStatusCode = 0 ,
2527 $ httpErrorMessage = "" ,
28+ $ httpRespBody = "" ,
2629 $ code = 0 ,
2730 \Throwable $ previous = null
2831 ) {
2932 parent ::__construct ($ message , $ code , $ previous );
3033 $ this ->httpStatusCode = $ httpStatusCode ;
3134 $ this ->httpErrorMessage = $ httpErrorMessage ;
35+ $ this ->httpRespBody = $ httpRespBody ;
3236 }
3337
3438 /**
@@ -50,4 +54,14 @@ public function getHttpErrorMessage()
5054 {
5155 return $ this ->httpErrorMessage ;
5256 }
57+
58+ /**
59+ * Get the HTTP response body
60+ *
61+ * @return mixed
62+ */
63+ public function getHttpRespBody ()
64+ {
65+ return $ this ->httpRespBody ;
66+ }
5367}
You can’t perform that action at this time.
0 commit comments