{% extends 'index.html' %}

{% block main %}

  {% if error %}
    <h2>{{ error.statusMessage }}</h2>
  {% else %}
    <h2>{{ title }}</h2>
    {% if nodes.length %}
      <table>
        <thead>
          <tr>
            <th>Nickname</th>
            <th>Bandwidth</th>
            <th>Uptime</th>
            <th>Country</th>
            <th>Flags</th>
            <th>Type</th>
          </tr>
        </thead>
        <tbody>
          {% for node in nodes %}
          <tr>
            <td><a href="/node/{{ node.fingerprint if node.fingerprint else node.hashed_fingerprint }}">{{ node.nickname }}</a></td>
            <td>{{ node | bandwidth }}</td>
            <td>{{ node | uptime }}</td>
            <td>{{ node.country_name }}</td>
            <td>{{ node.flags | join(', ') }}</td>
            <td>{{ node.type | title }}</td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    {% else %}
      <h3>No matches</h3>
    {% endif %}
    {% if req.query.s %}
      <section class="pagination">
        {% if req.query.p > 1 %}
          <a href="{{ req | pagination('prev') }}">&lt; Prev</a>
        {% endif %}
        {% if nodes.length == numOfNodes %}
          <a href="{{ req | pagination('next') }}">Next &gt;</a>
          {% endif %}
      </section>
    {% endif %}
  {% endif %}

{% endblock %}

{% extends 'index.html' %}

{% block main %}

  {% if error %}
    <h2>{{ 'Bad Search Query' if error.statusCode == 400 else error.statusMessage }}</h2>
  {% else %}
    <h2>{{ title }}</h2>
    {% if nodes.length %}
      <table>
        <thead>
          <tr>
            <th>Nickname</th>
            <th>Bandwidth</th>
            <th>Uptime</th>
            <th>Country</th>
            <th>Flags</th>
            <th>Type</th>
          </tr>
        </thead>
        <tbody>
          {% for node in nodes %}
          <tr>
            <td><a href="/node/{{ node.fingerprint if node.fingerprint else node.hashed_fingerprint }}">{{ node.nickname }}</a></td>
            <td>{{ node | bandwidth }}</td>
            <td>{{ node | uptime }}</td>
            <td>{{ node.country_name }}</td>
            <td>{{ node.flags | join(', ') }}</td>
            <td>{{ node.type | title }}</td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    {% else %}
      <h3>No matches</h3>
    {% endif %}
    {% if req.query.s %}
      <section class="pagination">
        {% if req.query.p > 1 %}
          <a href="{{ req | pagination('prev') }}">&lt; Prev</a>
        {% endif %}
        {% if nodes.length == numOfNodes %}
          <a href="{{ req | pagination('next') }}">Next &gt;</a>
          {% endif %}
      </section>
    {% endif %}
  {% endif %}

{% endblock %}

Add more descriptive search error message
Add more descriptive search error message
