{"record":{"id":"16ddc5c748bb9512","repo":"googleapis/mcp-toolbox","slug":"error-during-invocation-w","errorCode":null,"errorMessage":"error during invocation: %w","messagePattern":"error during invocation: %w","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"internal/server/api.go","lineNumber":191,"sourceCode":"\t\t\treturn\n\t\t}\n\t}\n\n\terr = tool.ValidateSource(src)\n\tif err != nil {\n\t\ts.logger.DebugContext(ctx, err.Error())\n\t\t_ = render.Render(w, r, newErrResponse(err, http.StatusNotFound))\n\t\treturn\n\t}\n\n\t// Extract OAuth access token from the \"Authorization\" header (currently for\n\t// BigQuery end-user credentials usage only)\n\taccessToken := tools.AccessToken(r.Header.Get(\"Authorization\"))\n\n\t// Check if this specific tool requires the standard authorization header\n\tclientAuth, err := tool.RequiresClientAuthorization(src)\n\tif err != nil {\n\t\terrMsg := fmt.Errorf(\"error during invocation: %w\", err)\n\t\ts.logger.DebugContext(ctx, errMsg.Error())\n\t\t_ = render.Render(w, r, newErrResponse(errMsg, http.StatusNotFound))\n\t\treturn\n\t}\n\tif clientAuth {\n\t\tif accessToken == \"\" {\n\t\t\terr = fmt.Errorf(\"tool requires client authorization but access token is missing from the request header\")\n\t\t\ts.logger.DebugContext(ctx, err.Error())\n\t\t\t_ = render.Render(w, r, newErrResponse(err, http.StatusUnauthorized))\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Tool authentication\n\t// claimsFromAuth maps the name of the authservice to the claims retrieved from it.\n\tclaimsFromAuth := make(map[string]map[string]any)\n\tfor _, aS := range s.PrimitiveMgr.AuthServices() {\n\t\tvar claims map[string]any","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/api.go#L173-L209","documentation":"Error \"error during invocation: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/api.go:191 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":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}