Waste collection form does not render errors for anonymous users
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3590155. -->
Reported by: [philipnorton42](https://www.drupal.org/user/545978)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The waste collection schedule lookup form does not print out messages about unknown postcodes for anonymous users. It does produce errors when the postcode field is not entered at all.</p>
<p>If the postcode is not know the user should see an error stating something like:</p>
<blockquote><p>No properties found for postcode XX1 1XX. Please check this is a valid postcode and search again.</p></blockquote>
<p>This works fine for logged in users, but for anonymous users the messages gets stuck in the page cache.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>- Ensure all Drupal caches are turned on.<br>
- Install the module and set up a bin collection schedule plugin.<br>
- Head to the form at /waste-collection-schedule as a anonymous user.<br>
- Enter a postcode that you know isn't on the list and click "Find".<br>
- The form will refresh and now show why the error occurred.</p>
<p>Interestingly, if you then click the "Find" after this without any postcode in the field then the error message _does_ show up, along with the error about the postcode field not being shown. This suggests that it is in there somewhere, but that the page cache is preventing it being shown.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Well, allow the error message to be shown for anonymous users.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Add a test?</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>When talking the issue through at the LGD tech drop-in it was suggested that the error message could be improved. We could take this opportunity to do that.</p>
issue