{"record":{"id":"c9157caed59a2f2a","repo":"clockworklabs/SpacetimeDB","slug":"there-is-already-an-http-handler-with-the-name","errorCode":null,"errorMessage":"There is already an HTTP handler with the name '${name}'","messagePattern":"There is already an HTTP handler with the name '(.+?)'","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/server/schema.ts","lineNumber":133,"sourceCode":"  submoduleDispatchInfos: SubmoduleDispatchInfo[] = [];\n\n  constructor(getSchemaType: (ctx: SchemaInner<S>) => S) {\n    super();\n    this.schemaType = getSchemaType(this);\n  }\n\n  defineFunction(name: string) {\n    if (this.existingFunctions.has(name)) {\n      throw new TypeError(\n        `There is already a reducer, procedure, or view with the name '${name}'`\n      );\n    }\n    this.existingFunctions.add(name);\n  }\n\n  defineHttpHandler(name: string) {\n    if (this.existingHttpHandlers.has(name)) {\n      throw new TypeError(\n        `There is already an HTTP handler with the name '${name}'`\n      );\n    }\n    this.existingHttpHandlers.add(name);\n  }\n\n  resolveSchedules() {\n    if (this.schedulesResolved) {\n      return;\n    }\n    this.schedulesResolved = true;\n    // Pending schedules come from two API paths:\n    // - legacy table({ scheduled }) schedules already know their tableName and\n    //   scheduleAtCol because schema() resolves them while iterating table keys\n    // - reducer/procedure({ onSchedule }) schedules only know the table handle,\n    //   so resolve them through tableSourceNames and reject duplicate table\n    //   handle registrations because the target table name is ambiguous\n    const scheduledTables = new Map<string, string>();","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/schema.ts#L115-L151","documentation":"Error \"There is already an HTTP handler with the name '${name}'\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings-typescript/src/server/schema.ts:133 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":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}