Semantic-Org/Semantic-UI · error

There was an issue querying the server.

Error message

There was an issue querying the server.

What it means

Shown via module.displayMessage(error.serverError) inside the apiSettings.onFailure callback (search.js:349-351) when $module.api(...) rejects the remote search request. It is rendered into the results panel as a user-facing error message, indicating the HTTP call to the search endpoint failed (non-2xx or network error).

Source

Thrown at src/definitions/modules/search.js:1305

  className: {
    animating : 'animating',
    active    : 'active',
    empty     : 'empty',
    focus     : 'focus',
    hidden    : 'hidden',
    loading   : 'loading',
    results   : 'results',
    pressed   : 'down'
  },

  error : {
    source          : 'Cannot search. No source used, and Semantic API module was not included',
    noResults       : 'Your search returned no results',
    logging         : 'Error in debug logging, exiting.',
    noEndpoint      : 'No search endpoint was specified',
    noTemplate      : 'A valid template name was not specified.',
    oldSearchSyntax : 'searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.',
    serverError     : 'There was an issue querying the server.',
    maxResults      : 'Results must be an array to use maxResults setting',
    method          : 'The method you called is not defined.'
  },

  metadata: {
    cache   : 'cache',
    results : 'results',
    result  : 'result'
  },

  regExp: {
    escape     : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
    beginsWith : '(?:\s|^)'
  },

  // maps api response attributes to internal representation
  fields: {
    categories      : 'results',     // array of categories (category view)

View on GitHub (pinned to 597843ab84)

Solutions

  1. Inspect the Network tab for the search request status and fix the server-side cause.
  2. Ensure the endpoint returns 200 with a {results:[...]} body on success; handle errors with the correct status codes.
  3. Provide an onFailure handler in apiSettings to retry or show a custom message instead of the default.

Example fix

// before
$('.ui.search').search({ apiSettings: { url: '/api/search?q={query}' } }); // server error -> [87]

// after
$('.ui.search').search({
  apiSettings: {
    url: '/api/search?q={query}',
    onFailure: function(){ showRetryBanner(); }
  }
});
Defensive patterns

Strategy: retry

Validate before calling

// Surface server availability before searching
fetch('/api/health').then(function(r){ if(!r.ok) showOfflineBanner(); });

Try / catch

// Provide onFailure in apiSettings instead of try/catch (module logs, doesn't throw)
$('.ui.search').search({
  apiSettings: {
    url: '/api/search?q={query}',
    onFailure: function(){ /* retry or custom UI */ }
  }
});

Prevention

When it happens

Trigger: Remote search (apiSettings configured) where the server returns a 4xx/5xx, the request is aborted after starting, or the network drops — api fires onFailure, which displays this message. Distinct from a successful empty result ([82]).

Common situations: Search endpoint is down or returns 500; CORS rejection; authentication failure (401/403); malformed query the server rejects; intermittent network issues in mobile environments.

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/1f39cf99c5fb733d. Report an issue: GitHub.