"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice"
master, latest, 18.1.0_go.mod_ file shows this information: github.com/Azure/azure-sdk-for-go v53.4.0+incompatible
go versiongo version go1.16.3 windows/amd64
Tried to create a bot using the following code save to a file named bot.go:
package main
import (
"context"
"fmt"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice"
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/Azure/go-autorest/autorest/to"
)
func main() {
botClient := botservice.NewBotsClient("<subscription_id>")
authorizer, err := auth.NewAuthorizerFromEnvironment()
if err == nil {
botClient.Authorizer = authorizer
} else {
fmt.Println("Error authorizing.")
}
theBot, err := botClient.Create(
context.Background(),
"<rg_name>",
"<some_bot_name>",
botservice.Bot{
Sku: &botservice.Sku{Name: "F0"},
Location: to.StringPtr("global"),
},
)
if err != nil {
fmt.Printf("Error: %v", err)
}
fmt.Println(theBot.ID)
}
Credentials were setup using environment variables.
Tried to run with go run bot.
After approximately 5 minutes waiting, got the following error back:
Error: botservice.BotsClient#Create: Failure responding to request: StatusCode=500 -- Original Error: autorest/azure: Service returned an error. Status=500 Code="InternalServerError" Message="Encountered internal server error. Please try again."
Looking at activity log on azure portal I see the cryptic "Internal Server Error" message only. No additional info...
The bot to have been successfully created on my Azure subscription resource group
Probably using the code I provided above using the latest stable release ofr azure sdk for go.
Running on Windows 10. Probably using the "latest stable" version of azure-sdk-for-go (just added the dependency to the code and ran go mod init)
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sgellock.
Issue Details
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice"
master, latest, 18.1.0_go.mod_ file shows this information: github.com/Azure/azure-sdk-for-go v53.4.0+incompatible
go versiongo version go1.16.3 windows/amd64
Tried to create a bot using the following code save to a file named bot.go:
package main
import (
"context"
"fmt"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice"
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/Azure/go-autorest/autorest/to"
)
func main() {
botClient := botservice.NewBotsClient("<subscription_id>")
authorizer, err := auth.NewAuthorizerFromEnvironment()
if err == nil {
botClient.Authorizer = authorizer
} else {
fmt.Println("Error authorizing.")
}
theBot, err := botClient.Create(
context.Background(),
"<rg_name>",
"<some_bot_name>",
botservice.Bot{
Sku: &botservice.Sku{Name: "F0"},
Location: to.StringPtr("global"),
},
)
if err != nil {
fmt.Printf("Error: %v", err)
}
fmt.Println(theBot.ID)
}
Credentials were setup using environment variables.
Tried to run with go run bot.
After approximately 5 minutes waiting, got the following error back:
Error: botservice.BotsClient#Create: Failure responding to request: StatusCode=500 -- Original Error: autorest/azure: Service returned an error. Status=500 Code="InternalServerError" Message="Encountered internal server error. Please try again."
Looking at activity log on azure portal I see the cryptic "Internal Server Error" message only. No additional info...
The bot to have been successfully created on my Azure subscription resource group
Probably using the code I provided above using the latest stable release ofr azure sdk for go.
Running on Windows 10. Probably using the "latest stable" version of azure-sdk-for-go (just added the dependency to the code and ran go mod init)
| Author: | rmsilva1973 |
|---|---|
| Assignees: | - |
| Labels: | `Bot Service`, `Service Attention`, `customer-reported`, `needs-triage`, `question` |
| Milestone: | - |
Hi @rmsilva1973 thank for this issue!
I am sorry this happens, and the error message reads like this is something wrong in the service side - therefore I just tagged this issue so that the corresponding service team could take a look at this.
Hi @rmsilva1973. Sorry you've run into this. I own bot framework and supporting tools. Bot Framework doesn't yet support Go language. We currently support Python, Java, JavaScript and C#. this looks like a migration effort by a team outside of my team. Let me try and track down who owns this. the code for the bot service api is autogenerated using openapi definitions. that much I can see from looking at the code.
Hi @rmsilva1973 Looking at this, it appears the underlying cause is the usage of an old Swagger file. I've filed #14627 to update this SDK to use the newest swagger file, at which point we can push a new release.
The updated package was published in v54.2.0. Please ping back if you're still having problems.