Skip to content

Transaction in use error when creating role #2197

@Flo4604

Description

@Flo4604

Preliminary Checks

Reproduction / Replay Link (Optional)

No response

Issue Summary

I randomly got this error when creating a role

{"error":{"code":"INTERNAL_SERVER_ERROR","docs":"https://unkey.dev/docs/api-reference/errors/code/INTERNAL_SERVER_ERROR","message":"target: unkey.-.primary: vttablet: rpc error: code = Aborted desc = transaction 1727848515790095014: in use: for query (CallerID: kzr01kdt6cz27x485f8p)","requestId":"req_2xEK1qBBAYjecN8sMJr7fHbKuajZ"}

Steps to Reproduce

  1. Try to create a role via API Example code of what I did when creating the role:
roles := []string{"admin", "account"}
for _, role := range roles {
    _, err := s.unkey.Permissions.CreateRole(ctx, operations.CreateRoleRequestBody{
    	Name: role,
    })
    
    if err != nil {
    	log.Printf("Error creating role %s", err)
    }
}

Expected behavior

To not get an error

Other information

No response

Screenshots

No response

Version info

-

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions