{"record":{"id":"7a9871c58bbc6604","repo":"yudai/gotty","slug":"failed-to-create-backend","errorCode":null,"errorMessage":"failed to create backend","messagePattern":"failed to create backend","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/handlers.go","lineNumber":121,"sourceCode":"\t}\n\tif init.AuthToken != server.options.Credential {\n\t\treturn errors.New(\"failed to authenticate websocket connection\")\n\t}\n\n\tqueryPath := \"?\"\n\tif server.options.PermitArguments && init.Arguments != \"\" {\n\t\tqueryPath = init.Arguments\n\t}\n\n\tquery, err := url.Parse(queryPath)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"failed to parse arguments\")\n\t}\n\tparams := query.Query()\n\tvar slave Slave\n\tslave, err = server.factory.New(params)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"failed to create backend\")\n\t}\n\tdefer slave.Close()\n\n\ttitleVars := server.titleVariables(\n\t\t[]string{\"server\", \"master\", \"slave\"},\n\t\tmap[string]map[string]interface{}{\n\t\t\t\"server\": server.options.TitleVariables,\n\t\t\t\"master\": map[string]interface{}{\n\t\t\t\t\"remote_addr\": conn.RemoteAddr(),\n\t\t\t},\n\t\t\t\"slave\": slave.WindowTitleVariables(),\n\t\t},\n\t)\n\n\ttitleBuf := new(bytes.Buffer)\n\terr = server.titleTemplate.Execute(titleBuf, titleVars)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"failed to fill window title template\")","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/yudai/gotty/blob/a080c85cbc59226c94c6941ad8c395232d72d517/server/handlers.go#L103-L139","documentation":"Wrapped error from factory.New in processWSConn: the configured backend (slave) refused or failed to initialize with the parsed query params — for the local command factory this covers exec failures such as command-not-found or permission denied. This is the generic boundary guarding all backend constructors.","triggerScenarios":"Thrown at server/handlers.go:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the configured command exists in PATH and is executable (local backend)","Validate factory-specific params derived from the query string before calling New","Surface the wrapped backend error in logs so operators can see the real cause"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a080c85cbc59226c94c6941ad8c395232d72d517","analyzedAt":"2026-09-02T16:42:38.150Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}