{"record":{"id":"8f0034a051478afd","repo":"CanineHQ/canine","slug":"failed-to-search-resources","errorCode":null,"errorMessage":"Failed to search resources","messagePattern":"Failed to search resources","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/javascript/controllers/team_resource_search_controller.js","lineNumber":20,"sourceCode":"\nexport default class extends AsyncSearchDropdownController {\n  static values = {\n    url: String,\n    addUrl: String,\n    resourceType: String,\n    turboFrame: String\n  }\n\n  async fetchResults(query) {\n    const url = `${this.urlValue}.json?q=${encodeURIComponent(query)}`\n    const response = await fetch(url, {\n      headers: {\n        'Accept': 'application/json'\n      }\n    })\n\n    if (!response.ok) {\n      throw new Error('Failed to search resources')\n    }\n\n    return await response.json()\n  }\n\n  renderItem(resource) {\n    return `\n      <div class=\"flex items-center gap-3 px-2 py-2\">\n        <div class=\"flex-1 min-w-0\">\n          <div class=\"font-medium truncate\">${this.escapeHtml(resource.name)}</div>\n        </div>\n      </div>\n    `\n  }\n\n  async onItemSelect(resource, itemElement) {\n    try {\n      itemElement.classList.add('opacity-50')","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/javascript/controllers/team_resource_search_controller.js#L2-L38","documentation":"Error \"Failed to search resources\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/javascript/controllers/team_resource_search_controller.js:20 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ba4ee3968d8513ee27d8583fbd3e854a8dd053f3","analyzedAt":"2026-08-23T17:49:27.834Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}