Gah, im having a nightmare today
authorChris Cormack <chrisc@catalyst.net.nz>
Tue, 8 Apr 2014 22:08:38 +0000 (10:08 +1200)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 8 Apr 2014 22:08:38 +0000 (10:08 +1200)
lib/NCIP/Handler/RequestItem.pm

index dd5643e..f98e70e 100644 (file)
@@ -44,7 +44,7 @@ sub handle {
         $vars->{'messagetype'} = 'RequestItemResponse';
         if ( !$result->{'success'} ) {
             $vars->{'processingerror'}        = 1;
-            $vars->{'processingerrortype'}    = $messages;
+            $vars->{'processingerrortype'}    = $result->{messages};
             $vars->{'processingerrorelement'} = 'UniqueItemIdentifier';
             $output = $self->render_output( 'problem.tt', $vars );
         }
@@ -52,7 +52,7 @@ sub handle {
             my $elements = $self->get_user_elements($xmldoc);
             $vars->{'elements'} = $elements;
 
-            $vars->{'messages'} = $messages;
+            $vars->{'messages'} = $result->{messages};
             $output = $self->render_output( 'response.tt', $vars );
         }
         return $output;