Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-12589

Error: 'Can't call method "current_page" on an undefined value' when direct search query times out

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2023-02-28
    • None
    • Search
    • None

      This issue occurs if a direct search query times out. But the error below is not visible to the user; they'll get an Internal Server Error page with the query timeout instead. So this is an internal-only ISE that spams Sentry.

      Sentry Issue: MUSICBRAINZ-SERVER-6V

      None: Can't call method "current_page" on an undefined value at lib/MusicBrainz/Server/ControllerUtils/JSON.pm line 13.
        File "JSON.pm", line 13, in MusicBrainz::Server::ControllerUtils::JSON::serialize_pager
          current_page => $pager->current_page + 0,
        File "Search.pm", line 72, in Catalyst::dispatch
          results => to_json_array($stash->{results}),
        File "Server.pm", line 388, in MusicBrainz::Server::__ANON__
          $c->$orig(@args)
        File "Server.pm", line 353, in MusicBrainz::Server::with_translations
          $code->();
        File "Server.pm", line 389, in Class::MOP::Method::Wrapped::__ANON__
          });
      ...
      (2 additional frame(s) were not displayed)
      

            bitmap Michael Wiencek
            bitmap Michael Wiencek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2023-02-28