{"record":{"id":"1f39cf99c5fb733d","repo":"Semantic-Org/Semantic-UI","slug":"there-was-an-issue-querying-the-server","errorCode":null,"errorMessage":"There was an issue querying the server.","messagePattern":"There was an issue querying the server\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/search.js","lineNumber":1305,"sourceCode":"  className: {\n    animating : 'animating',\n    active    : 'active',\n    empty     : 'empty',\n    focus     : 'focus',\n    hidden    : 'hidden',\n    loading   : 'loading',\n    results   : 'results',\n    pressed   : 'down'\n  },\n\n  error : {\n    source          : 'Cannot search. No source used, and Semantic API module was not included',\n    noResults       : 'Your search returned no results',\n    logging         : 'Error in debug logging, exiting.',\n    noEndpoint      : 'No search endpoint was specified',\n    noTemplate      : 'A valid template name was not specified.',\n    oldSearchSyntax : 'searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.',\n    serverError     : 'There was an issue querying the server.',\n    maxResults      : 'Results must be an array to use maxResults setting',\n    method          : 'The method you called is not defined.'\n  },\n\n  metadata: {\n    cache   : 'cache',\n    results : 'results',\n    result  : 'result'\n  },\n\n  regExp: {\n    escape     : /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\n    beginsWith : '(?:\\s|^)'\n  },\n\n  // maps api response attributes to internal representation\n  fields: {\n    categories      : 'results',     // array of categories (category view)","sourceCodeStart":1287,"sourceCodeEnd":1323,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/search.js#L1287-L1323","documentation":"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).","triggerScenarios":"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]).","commonSituations":"Search endpoint is down or returns 500; CORS rejection; authentication failure (401/403); malformed query the server rejects; intermittent network issues in mobile environments.","solutions":["Inspect the Network tab for the search request status and fix the server-side cause.","Ensure the endpoint returns 200 with a {results:[...]} body on success; handle errors with the correct status codes.","Provide an onFailure handler in apiSettings to retry or show a custom message instead of the default."],"exampleFix":"// before\n$('.ui.search').search({ apiSettings: { url: '/api/search?q={query}' } }); // server error -> [87]\n\n// after\n$('.ui.search').search({\n  apiSettings: {\n    url: '/api/search?q={query}',\n    onFailure: function(){ showRetryBanner(); }\n  }\n});","handlingStrategy":"retry","validationCode":"// Surface server availability before searching\nfetch('/api/health').then(function(r){ if(!r.ok) showOfflineBanner(); });","typeGuard":null,"tryCatchPattern":"// Provide onFailure in apiSettings instead of try/catch (module logs, doesn't throw)\n$('.ui.search').search({\n  apiSettings: {\n    url: '/api/search?q={query}',\n    onFailure: function(){ /* retry or custom UI */ }\n  }\n});","preventionTips":["Provide an apiSettings.onFailure handler for retries/custom UI.","Monitor endpoint health and fix 5xx causes server-side.","Distinguish network errors from empty results for correct UX."],"tags":["search","server-error","network","api-module","semantic-ui"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}