The standalone search handles errors at https://bitbucket.org/metabrainz/musicbrainz-server/src/4c753d3963210fb4cae039c9fe33637b89d1434a/lib/MusicBrainz/Server/Controller/Search.pm?at=beta#cl-220
When we get the "read timeout" error from the search server, it uses the internal-error.tt template.
First I broke all searches by adding:
Then I checked that the standalone search displays the error message as I expected. Then I tested with the inline search, but that just displays "(No results)", which is incorrect - we don't know if there are any results or not because the search failed. At the very least, it should display something which indicates that the search failed.
Investigating further, I guess https://bitbucket.org/metabrainz/musicbrainz-server/src/4c753d3963210fb4cae039c9fe33637b89d1434a/lib/MusicBrainz/Server/Controller/WS/js/Role/Autocompletion.pm?at=beta#cl-83 is where it needs fixing.