[freeside-commits] freeside/FS/FS/part_export acct_google.pm, 1.3, 1.4
Mark Wells
mark at wavetail.420.am
Sat Apr 30 14:20:52 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv27245/FS/FS/part_export
Modified Files:
acct_google.pm
Log Message:
better error handling in google export, #12064
Index: acct_google.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/acct_google.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- acct_google.pm 22 Mar 2011 21:03:09 -0000 1.3
+++ acct_google.pm 30 Apr 2011 21:20:50 -0000 1.4
@@ -89,15 +89,18 @@
);
}
-sub captcha_url {
+sub auth_error {
my $self = shift;
my $google = $self->google_handle;
- if (exists ($google->{'captcha_url'}) ) {
- return 'http://www.google.com/accounts/'.$google->{'captcha_url'};
- }
- else {
- return '';
+ if ( $google->{'error'} ) {
+ my $url = $google->{'captcha_url'} || '';
+ $url = "http://www.google.com/accounts/$url" if $url;
+ return { 'captcha_url' => $url,
+ 'message' =>
+ 'Unable to connect to the Google API: '.$google->{'error'}.'.',
+ };
}
+ return; #nothing on success
}
sub captcha_auth {
More information about the freeside-commits
mailing list