Skip to content

Add curl error message to logs #3

Description

@arski

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions