{"record":{"id":"0f833b8a6ea387df","repo":"wtfutil/wtf","slug":"could-not-create-client-w","errorCode":null,"errorMessage":"could not create client: %w","messagePattern":"could not create client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/azuredevops/widget.go","lineNumber":33,"sourceCode":"\tcli           azrBuild.Client\n\tsettings      *Settings\n\tdisplayBuffer string\n\tctx           context.Context\n}\n\nfunc NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget {\n\twidget := Widget{\n\t\tTextWidget: view.NewTextWidget(tviewApp, redrawChan, pages, settings.Common),\n\t\tsettings:   settings,\n\t}\n\n\twidget.View.SetScrollable(true)\n\tconnection := azr.NewPatConnection(settings.orgURL, settings.apiToken)\n\tctx := context.Background()\n\n\tcli, err := azrBuild.NewClient(ctx, connection)\n\tif err != nil {\n\t\twidget.displayBuffer = fmt.Errorf(\"could not create client: %w\", err).Error()\n\t} else {\n\t\twidget.cli = cli\n\t\twidget.ctx = ctx\n\t}\n\n\twidget.refreshDisplayBuffer()\n\n\treturn &widget\n}\n\nfunc (widget *Widget) Refresh() {\n\twidget.refreshDisplayBuffer()\n\twidget.Redraw(widget.display)\n}\n\nfunc (widget *Widget) display() (string, string, bool) {\n\treturn widget.CommonSettings().Title, widget.displayBuffer, true\n}","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/azuredevops/widget.go#L15-L51","documentation":"Raised in NewWidget when azrBuild.NewClient fails to construct the Azure DevOps build API client from the PAT connection (orgURL + apiToken). The error is stored in the widget's display buffer rather than returned; the widget will show this message instead of build data. Typically means the client could not be initialized against the organization endpoint.","triggerScenarios":"Thrown at modules/azuredevops/widget.go:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify orgURL is a correct Azure DevOps organization URL (e.g. https://dev.azure.com/myorg)","Verify apiToken is a non-empty valid personal access token","Check network/DNS connectivity to the Azure DevOps endpoint","Review the wrapped error in the display buffer for the client-creation failure cause"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bb838c1ccb0f0f3223690df44afdec663d622881","analyzedAt":"2026-09-03T17:02:45.030Z","contentChangedAt":"2026-09-03T17:02:45.030Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}