madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22552: LJSUP-13176: JSON RPC code refactoring

Committer: sbelyaev
LJSUP-13176: JSON RPC code refactoring
U   trunk/cgi-bin/LJ/JSON/RPC/Item.pm
U   trunk/cgi-bin/LJ/JSON/RPC.pm
Modified: trunk/cgi-bin/LJ/JSON/RPC/Item.pm
===================================================================
--- trunk/cgi-bin/LJ/JSON/RPC/Item.pm	2012-08-02 11:01:14 UTC (rev 22551)
+++ trunk/cgi-bin/LJ/JSON/RPC/Item.pm	2012-08-02 11:05:30 UTC (rev 22552)
@@ -130,8 +130,8 @@
              $error = $fatal;
         }
         
-        my %error_data = { 'code'    => $error->{'error_code'},
-                           'message' => $error->{'error_message'}, };
+        my %error_data = ( 'code'    => $error->{'error_code'},
+                           'message' => $error->{'error_message'}, );
        
         if ($error->{'data'}) {
             $error_data{'data'} = $error->{'data'};

Modified: trunk/cgi-bin/LJ/JSON/RPC.pm
===================================================================
--- trunk/cgi-bin/LJ/JSON/RPC.pm	2012-08-02 11:01:14 UTC (rev 22551)
+++ trunk/cgi-bin/LJ/JSON/RPC.pm	2012-08-02 11:05:30 UTC (rev 22552)
@@ -39,7 +39,7 @@
 
     if ($@) {
         warn $@ if $LJ::IS_DEV_SERVER;
-        my $fatal = { 'error_code' => -32700, 
+        my $fatal = { 'error_code'    => -32700, 
                       'error_message' => 'Parse error' };
 
         my $item = LJ::JSON::RPC::Item->new({ 'fatal' =>  $fatal });

Tags: livejournal, madeon, pm, sbelyaev
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