System error

error:  Can't call method "plan_id" on an undefined value at /var/www/html/special-api.html line 25.
context: 
... 
21:  my $user_id = $m->comp('checkCookie.mas');
22:  my $user = PSG::Users->retrieve($user_id);
23: 
24:  my $notAdmin = '';
25:  if($user->plan_id) {
26:  $notAdmin = " AND user_id = $user_id ";
27:  }
28: 
29:  if($domain_url) {
... 
code stack:  /var/www/html/special-api.html:25
raw error






























Can't call method "plan_id" on an undefined value at /var/www/html/special-api.html line 25.


Trace begun at /usr/local/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "plan_id" on an undefined value at /var/www/html/special-api.html line 25.^J') called at /var/www/html/special-api.html line 25
HTML::Mason::Commands::__ANON__ at /usr/local/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f908879a878)') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 484
eval {...} at /usr/local/share/perl5/HTML/Mason/Request.pm line 484
eval {...} at /usr/local/share/perl5/HTML/Mason/Request.pm line 436
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f908685a908)') called at /usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f908685a908)') called at /usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f908700dd08)', 'Apache2::RequestRec=SCALAR(0x7f90887a15f0)') called at (eval 31) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x7f90887a15f0)') called at -e line 0
eval {...} at -e line 0