{"record":{"id":"c8fd9f9d39a05c85","repo":"Semantic-Org/Semantic-UI","slug":"your-request-timed-out","errorCode":null,"errorMessage":"Your request timed out","messagePattern":"Your request timed out","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/behaviors/api.js","lineNumber":1141,"sourceCode":"  successTest : false,\n\n  // errors\n  error : {\n    beforeSend        : 'The before send function has aborted the request',\n    error             : 'There was an error with your request',\n    exitConditions    : 'API Request Aborted. Exit conditions met',\n    JSONParse         : 'JSON could not be parsed during error handling',\n    legacyParameters  : 'You are using legacy API success callback names',\n    method            : 'The method you called is not defined',\n    missingAction     : 'API action used but no url was defined',\n    missingSerialize  : 'jquery-serialize-object is required to add form data to an existing data object',\n    missingURL        : 'No URL specified for api event',\n    noReturnedValue   : 'The beforeSend callback must return a settings object, beforeSend ignored.',\n    noStorage         : 'Caching responses locally requires session storage',\n    parseError        : 'There was an error parsing your request',\n    requiredParameter : 'Missing a required URL parameter: ',\n    statusMessage     : 'Server gave an error: ',\n    timeout           : 'Your request timed out'\n  },\n\n  regExp  : {\n    required : /\\{\\$*[A-z0-9]+\\}/g,\n    optional : /\\{\\/\\$*[A-z0-9]+\\}/g,\n  },\n\n  className: {\n    loading : 'loading',\n    error   : 'error'\n  },\n\n  selector: {\n    disabled : '.disabled',\n    form      : 'form'\n  },\n\n  metadata: {","sourceCodeStart":1123,"sourceCodeEnd":1159,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/api.js#L1123-L1159","documentation":"This error message is defined in the API module's settings.error dictionary under the 'timeout' key. It is surfaced through the dynamic lookup settings.error[status] (api.js:705-706) when jQuery's AJAX request fails with a textStatus of 'timeout'. The errorFromRequest function returns this message when the response object lacks a structured error field and the status matches 'timeout'. It indicates the request exceeded the configured timeout duration.","triggerScenarios":"An API module request exceeds settings.timeout (in milliseconds) without receiving a response. jQuery aborts the request and reports status 'timeout'. The fail handler (api.js:558) fires, and errorFromRequest returns settings.error['timeout']. This occurs with slow server responses, network latency, or an unreasonably low timeout setting.","commonSituations":"Default timeout being too short for heavy server-side processing. Network congestion or high latency on mobile connections. Server-side long-running queries without pagination. Load balancer or proxy timeout thresholds lower than the client-side timeout. Requests to third-party APIs with unpredictable response times.","solutions":["Increase settings.timeout to accommodate realistic server response times.","Optimize the server endpoint to respond faster (query optimization, caching, pagination).","Implement retry logic with exponential backoff for transient timeout failures.","Use settings.onAbort or settings.onError to provide user feedback on timeouts."],"exampleFix":"// before\n$('.el').api({\n  url: '/api/heavy-query',\n  timeout: 3000 // too short for this endpoint\n});\n\n// after\n$('.el').api({\n  url: '/api/heavy-query',\n  timeout: 30000,\n  onError: function(errorMessage, $module, xhr) {\n    if (xhr.statusText === 'timeout') {\n      $module.text('Request timed out. Retrying...');\n      setTimeout(function() { $('.el').api('query'); }, 2000);\n    }\n  }\n});","handlingStrategy":"retry","validationCode":"// Set an appropriate timeout and detect timeout conditions\n$('.el').api({\n  url: '/api/data',\n  timeout: 30000,\n  onError: function(errorMessage, $module, xhr) {\n    if (xhr && xhr.statusText === 'timeout') {\n      console.warn('Request timed out; consider retrying or optimizing the endpoint.');\n    }\n  }\n});","typeGuard":"// Check if an XHR failure was due to timeout\nfunction isTimeoutError(xhr) {\n  return xhr && xhr.statusText === 'timeout';\n}","tryCatchPattern":"// Retry pattern for transient timeouts\nvar retryCount = 0;\nvar maxRetries = 3;\n$('.el').api({\n  url: '/api/data',\n  timeout: 15000,\n  onError: function(errorMessage, $module, xhr) {\n    if (isTimeoutError(xhr) && retryCount < maxRetries) {\n      retryCount++;\n      setTimeout(function() { $('.el').api('query'); }, 1000 * retryCount);\n    } else {\n      console.error('Request failed after retries:', errorMessage);\n    }\n  }\n});","preventionTips":["Set a realistic timeout based on the endpoint's expected response time.","Optimize slow server-side queries and add pagination for large datasets.","Implement exponential backoff retry logic for transient network issues."],"tags":["api","timeout","ajax","network","semantic-ui"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}