PuSHSubscriber icon indicating copy to clipboard operation
PuSHSubscriber copied to clipboard

Add curl error message to logs

Open arski opened this issue 13 years ago • 0 comments

When calling curl_exec, sometimes one might get a return code which is not desired (i.e. not 202, 204), in which case an error message will be inside the curl_exec response..

I would suggest adding the error message to the log when a subscription attempt doesn't succeed, something like:

262c262
<     curl_exec($request);

---
>     $ret = curl_exec($request);
270c270
<       $this->log("Error issuing \"$mode\" request to $hub ($code).", 'error');

---
>       $this->log("Error issuing \"$mode\" request to $hub ($code): $ret.", 'error');

This is possibly something that might be done at other locations within the code as well and would be extremely useful to developers.

arski avatar Jul 18 '11 18:07 arski