File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ public static function make()
1818
1919 abstract public function getHttpClient ();
2020
21- abstract public function handleEmptyResponse (?string $ content = null );
21+ abstract public function handleEmptyResponse (?string $ content = null , $ response = null );
2222
2323 abstract public function isErrorResponse (): bool ;
2424
25- abstract public function handleErrorResponse (?string $ content = null );
25+ abstract public function handleErrorResponse (?string $ content = null , array $ data = [] );
2626
2727 abstract public function hasPaginate (): bool ;
2828
@@ -41,11 +41,11 @@ public function castResponse($response)
4141 $ result = json_decode ($ content = $ response ->getBody ()->getContents (), true ) ?? [];
4242
4343 if (empty ($ result )) {
44- $ this ->handleEmptyResponse ($ content );
44+ $ this ->handleEmptyResponse ($ content, $ response );
4545 }
4646
4747 if ($ this ->isErrorResponse ()) {
48- $ this ->handleErrorResponse ($ content );
48+ $ this ->handleErrorResponse ($ content, $ result );
4949 }
5050
5151 return $ result ;
You can’t perform that action at this time.
0 commit comments