{"record":{"id":"dad2ca8a42d8daf0","repo":"discourse/discourse","slug":"404-error-responsetext","errorCode":null,"errorMessage":"404: ${error.responseText}","messagePattern":"404: \\$\\{error\\.responseText\\}","errorType":"http","errorClass":"Error","httpStatus":404,"severity":"error","filePath":"frontend/discourse/app/adapters/rest.js","lineNumber":24,"sourceCode":"const ADMIN_MODELS = [\n  \"plugin\",\n  \"theme\",\n  \"embeddable-host\",\n  \"web-hook\",\n  \"web-hook-event\",\n  \"flagged-topic\",\n];\n\nexport function Result(payload, responseJson) {\n  this.payload = payload;\n  this.responseJson = responseJson;\n  this.target = null;\n}\n\n// We use this to make sure 404s are caught\nfunction rethrow(error) {\n  if (error.status === 404) {\n    throw new Error(\"404: \" + error.responseText);\n  }\n  throw error;\n}\n\nexport default class RestAdapter extends EmberObject {\n  primaryKey = \"id\";\n  jsonMode = false;\n\n  storageKey(type, findArgs, options) {\n    if (options && options.cacheKey) {\n      return options.cacheKey;\n    }\n    const hashedArgs = Math.abs(hashString(JSON.stringify(findArgs)));\n    return `${type}_${hashedArgs}`;\n  }\n\n  basePath(store, type) {\n    if (ADMIN_MODELS.includes(type.replace(\"_\", \"-\"))) {","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/discourse/discourse/blob/1b2d7253e854205d2c95c80b2c6a1cdd42e45059/frontend/discourse/app/adapters/rest.js#L6-L42","documentation":"Error \"404: ${error.responseText}\" thrown in discourse/discourse.","triggerScenarios":"Thrown at frontend/discourse/app/adapters/rest.js:24 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":"1b2d7253e854205d2c95c80b2c6a1cdd42e45059","analyzedAt":"2026-08-26T03:11:08.302Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}