File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,4 +35,14 @@ public static function prepareGateway(&$gateway) {}
3535 * the parsed xml string data returned by the Gateway by reference
3636 */
3737public function exposeData(& $data) {}
38+
39+ /**
40+ * This method is called when their is an http error
41+ * or when content type is unsupported
42+ *
43+ * @since Remote Datasource 2.0
44+ * @param array $info
45+ * info of the http request
46+ */
47+ public function httpError(& $info) {}
3848````
Original file line number Diff line number Diff line change @@ -69,6 +69,19 @@ public static function prepareGateway(&$gateway)
6969 public function exposeData (&$ data )
7070 {
7171
72+ }
73+
74+ /**
75+ * This method is called when their is an http error
76+ * or when content type is unsupported
77+ *
78+ * @since Remote Datasource 2.0
79+ * @param array $info
80+ * info of the http request
81+ */
82+ public function httpError (&$ info )
83+ {
84+
7285 }
7386
7487/*-------------------------------------------------------------------------
@@ -678,6 +691,8 @@ public function execute(array &$param_pool = null)
678691 $ writeToCache = false ;
679692
680693 $ result ->setAttribute ('valid ' , 'false ' );
694+
695+ $ this ->httpError ($ info );
681696
682697 // 28 is CURLE_OPERATION_TIMEOUTED
683698 if ($ info ['curl_error ' ] == 28 ) {
You can’t perform that action at this time.
0 commit comments