Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r11202: LJSUP-10469 (handle QotD repost errors b...

Committer: ailyin
LJSUP-10469 (handle QotD repost errors better)
U   trunk/cgi-bin/LJ/Hooks/QotD.pm
Modified: trunk/cgi-bin/LJ/Hooks/QotD.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/QotD.pm	2011-11-22 14:23:11 UTC (rev 11201)
+++ trunk/cgi-bin/LJ/Hooks/QotD.pm	2011-11-22 14:52:45 UTC (rev 11202)
@@ -261,8 +261,13 @@
         $repost_req->{'props'}->{'origin_url'} = $entry->url;
         $repost_req->{'props'}->{'opt_nocomments'} = 1;
 
-        LJ::Protocol::do_request( 'postevent', $repost_req,
-                                  \'', { 'noauth' => 1 } );
+        my $error = '';
+        my $repost_res = LJ::Protocol::do_request(
+            'postevent', $repost_req, \$error, { 'noauth' => 1 } );
+
+        unless ($repost_res) {
+            warn "QotD repost error: $error";
+        }
     }
 
     # add to queue

Tags: ailyin, andy, ljcom, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments