File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ public function retrieveResponse(
28
28
throw new HttpTokenResponseException (
29
29
$ msg . $ http ->error . ' [HTTP ' . $ http ->status . '] ' ,
30
30
$ http ->status ,
31
- $ http ->error
31
+ $ http ->error ,
32
+ $ http ->resp_body
32
33
);
33
34
}
34
35
Original file line number Diff line number Diff line change @@ -11,24 +11,28 @@ class HttpTokenResponseException extends TokenResponseException
11
11
{
12
12
protected $ httpStatusCode = 0 ;
13
13
protected $ httpErrorMessage = "" ;
14
+ protected $ httpRespBody = "" ;
14
15
15
16
/**
16
17
* @param string $message
17
18
* @param int $httpStatusCode
18
19
* @param string httpErrorMessage
20
+ * @param mixed httpRespBody
19
21
* @param int $code
20
22
* @param \Throwable|null $previous
21
23
*/
22
24
public function __construct (
23
25
$ message = "" ,
24
26
$ httpStatusCode = 0 ,
25
27
$ httpErrorMessage = "" ,
28
+ $ httpRespBody = "" ,
26
29
$ code = 0 ,
27
30
\Throwable $ previous = null
28
31
) {
29
32
parent ::__construct ($ message , $ code , $ previous );
30
33
$ this ->httpStatusCode = $ httpStatusCode ;
31
34
$ this ->httpErrorMessage = $ httpErrorMessage ;
35
+ $ this ->httpRespBody = $ httpRespBody ;
32
36
}
33
37
34
38
/**
@@ -50,4 +54,14 @@ public function getHttpErrorMessage()
50
54
{
51
55
return $ this ->httpErrorMessage ;
52
56
}
57
+
58
+ /**
59
+ * Get the HTTP response body
60
+ *
61
+ * @return mixed
62
+ */
63
+ public function getHttpRespBody ()
64
+ {
65
+ return $ this ->httpRespBody ;
66
+ }
53
67
}
You can’t perform that action at this time.
0 commit comments