Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error when trying to create new user #1377

Closed
AlexanderShK opened this issue Dec 20, 2024 · 1 comment
Closed

Internal server error when trying to create new user #1377

AlexanderShK opened this issue Dec 20, 2024 · 1 comment

Comments

@AlexanderShK
Copy link

Internal server error when trying to create new user
Got this error with 0.18.1 and 0.18.4+4401191b versions

gravity-1  |  panic: runtime error: index out of range [0] with length 0
gravity-1  |
gravity-1  |  -> beryju.io/gravity/pkg/roles/api/auth.(*AuthProvider).APIUsersPut.func1
gravity-1  |  ->   /workspace/pkg/roles/api/auth/api_users.go:83
gravity-1  |
gravity-1  |     github.com/swaggest/usecase.NewInteractor[...].func1
gravity-1  |       /go/pkg/mod/github.com/swaggest/[email protected]/generic_go1.18.go:46
gravity-1  |     github.com/swaggest/usecase.Interact.Interact
gravity-1  |       /go/pkg/mod/github.com/swaggest/[email protected]/interactor.go:25
gravity-1  |     github.com/swaggest/rest/nethttp.(*Handler).ServeHTTP
gravity-1  |       /go/pkg/mod/github.com/swaggest/[email protected]/nethttp/handler.go:128
gravity-1  |     github.com/go-chi/chi/v5/middleware.Recoverer.func1
gravity-1  |       /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/recoverer.go:45
gravity-1  |     net/http.HandlerFunc.ServeHTTP
gravity-1  |       /usr/local/go/src/net/http/server.go:2220
gravity-1  |     github.com/go-chi/chi/v5.(*Mux).routeHTTP
gravity-1  |       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:459
gravity-1  |     net/http.HandlerFunc.ServeHTTP
gravity-1  |       /usr/local/go/src/net/http/server.go:2220
gravity-1  |     github.com/go-chi/chi/v5.(*Mux).ServeHTTP
gravity-1  |       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90
gravity-1  |     beryju.io/gravity/pkg/roles/api/auth.(*AuthProvider).ServeHTTP
gravity-1  |       /workspace/pkg/roles/api/auth/middleware.go:42
gravity-1  |     beryju.io/gravity/pkg/roles/api.loggingHandler.ServeHTTP
gravity-1  |       /workspace/pkg/roles/api/middleware_log.go:100
gravity-1  |     beryju.io/gravity/pkg/roles/api.(*Role).SessionMiddleware-fm.(*Role).SessionMiddleware.func1
gravity-1  |       /workspace/pkg/roles/api/middleware_session.go:54
gravity-1  |     net/http.HandlerFunc.ServeHTTP
BeryJu added a commit that referenced this issue Dec 20, 2024
BeryJu added a commit that referenced this issue Dec 20, 2024
* fix some tests not running

* fix existing user check

#1377
@AlexanderShK
Copy link
Author

Thanks, fixed by 0.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant