Skip to content

Instantly share code, notes, and snippets.

@KevinNitroG
Created November 8, 2025 18:44
Show Gist options
  • Save KevinNitroG/18dadc3480ab8b621df6d6671f885df0 to your computer and use it in GitHub Desktop.
Save KevinNitroG/18dadc3480ab8b621df6d6671f885df0 to your computer and use it in GitHub Desktop.
Log file panic
go build -gcflags='all=-N -l' -o ./backend ./cmd/main.go
./backend
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
2025/11/09 01:03:55 bucket not exist: operation error S3: HeadBucket, exceeded maximum number of attempts, 3, https response error StatusCode: 0, RequestID: , HostID: , request send failed, Head "http://localhost:9000/electricilies": dial tcp [::1]:9000: connect: connection refused
2025/11/09 01:03:55 error when connecting to keycloak:could not get token: Post "http://localhost:8081/realms/electricilies/protocol/openid-connect/token": dial tcp [::1]:8081: connect: connection refused
[GIN-debug] GET /metrics --> github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] GET /health/live --> backend/internal/interface/api/handler.HealthCheck.Liveness-fm (2 handlers)
[GIN-debug] GET /health/ready --> backend/internal/interface/api/handler.HealthCheck.Readiness-fm (2 handlers)
[GIN-debug] GET /api/users --> backend/internal/interface/api/handler.User.List-fm (4 handlers)
[GIN-debug] POST /api/users --> backend/internal/interface/api/handler.User.Create-fm (4 handlers)
[GIN-debug] GET /api/users/:user_id --> backend/internal/interface/api/handler.User.Get-fm (4 handlers)
[GIN-debug] PUT /api/users/:user_id --> backend/internal/interface/api/handler.User.Update-fm (4 handlers)
[GIN-debug] DELETE /api/users/:user_id --> backend/internal/interface/api/handler.User.Delete-fm (4 handlers)
[GIN-debug] GET /api/users/:user_id/return-requests --> backend/internal/interface/api/handler.User.GetReturnRequests-fm (4 handlers)
[GIN-debug] GET /api/carts --> backend/internal/interface/api/handler.Cart.GetCartByUser-fm (4 handlers)
[GIN-debug] POST /api/carts/item --> backend/internal/interface/api/handler.Cart.AddItem-fm (4 handlers)
[GIN-debug] PUT /api/carts/item --> backend/internal/interface/api/handler.Cart.UpdateItem-fm (4 handlers)
[GIN-debug] DELETE /api/carts/item --> backend/internal/interface/api/handler.Cart.RemoveItem-fm (4 handlers)
[GIN-debug] GET /api/categories --> backend/internal/interface/api/handler.Category.List-fm (4 handlers)
[GIN-debug] POST /api/categories --> backend/internal/interface/api/handler.Category.Create-fm (4 handlers)
[GIN-debug] PUT /api/categories/:category_id --> backend/internal/interface/api/handler.Category.Update-fm (4 handlers)
[GIN-debug] DELETE /api/categories/:category_id --> backend/internal/interface/api/handler.Category.Delete-fm (4 handlers)
[GIN-debug] GET /api/products --> backend/internal/interface/api/handler.Product.List-fm (4 handlers)
[GIN-debug] POST /api/products --> backend/internal/interface/api/handler.Product.Create-fm (4 handlers)
[GIN-debug] GET /api/products/:product_id --> backend/internal/interface/api/handler.Product.Get-fm (4 handlers)
[GIN-debug] PUT /api/products/:product_id --> backend/internal/interface/api/handler.Product.Update-fm (4 handlers)
[GIN-debug] DELETE /api/products/:product_id --> backend/internal/interface/api/handler.Product.Delete-fm (4 handlers)
[GIN-debug] POST /api/products/options --> backend/internal/interface/api/handler.Product.CreateProductOption-fm (4 handlers)
[GIN-debug] GET /api/products/images/upload-url --> backend/internal/interface/api/handler.Product.GetUploadImageURL-fm (4 handlers)
[GIN-debug] GET /api/products/images/delete-url/:image_id --> backend/internal/interface/api/handler.Product.GetDeleteImageURL-fm (4 handlers)
[GIN-debug] POST /api/products/variants --> backend/internal/interface/api/handler.Product.CreateProductVariant-fm (4 handlers)
[GIN-debug] PUT /api/products/variants/:variant_id --> backend/internal/interface/api/handler.Product.UpdateProductVariant-fm (4 handlers)
[GIN-debug] PUT /api/products/options/:option_id --> backend/internal/interface/api/handler.Product.UpdateProductOption-fm (4 handlers)
[GIN-debug] GET /api/attributes --> backend/internal/interface/api/handler.Attribute.List-fm (4 handlers)
[GIN-debug] POST /api/attributes --> backend/internal/interface/api/handler.Attribute.Create-fm (4 handlers)
[GIN-debug] GET /api/attributes/:attribute_id --> backend/internal/interface/api/handler.Attribute.Get-fm (4 handlers)
[GIN-debug] PUT /api/attributes/:attribute_id --> backend/internal/interface/api/handler.Attribute.Update-fm (4 handlers)
[GIN-debug] DELETE /api/attributes/:id --> backend/internal/interface/api/handler.Attribute.Delete-fm (4 handlers)
[GIN-debug] GET /api/orders --> backend/internal/interface/api/handler.Order.List-fm (4 handlers)
[GIN-debug] POST /api/orders --> backend/internal/interface/api/handler.Order.Create-fm (4 handlers)
[GIN-debug] GET /api/orders/:order_id --> backend/internal/interface/api/handler.Order.Get-fm (4 handlers)
[GIN-debug] PUT /api/orders/:order_id --> backend/internal/interface/api/handler.Order.Update-fm (4 handlers)
[GIN-debug] DELETE /api/orders/:order_id --> backend/internal/interface/api/handler.Order.Delete-fm (4 handlers)
[GIN-debug] GET /api/return-requests --> backend/internal/interface/api/handler.ReturnRequest.List-fm (4 handlers)
[GIN-debug] POST /api/return-requests --> backend/internal/interface/api/handler.ReturnRequest.Create-fm (4 handlers)
[GIN-debug] GET /api/return-requests/:return_request_id --> backend/internal/interface/api/handler.ReturnRequest.Get-fm (4 handlers)
[GIN-debug] PUT /api/return-requests/:return_request_id --> backend/internal/interface/api/handler.ReturnRequest.Update-fm (4 handlers)
[GIN-debug] GET /api/refunds --> backend/internal/interface/api/handler.Refund.List-fm (4 handlers)
[GIN-debug] GET /api/refunds/:refund_id --> backend/internal/interface/api/handler.Refund.Get-fm (4 handlers)
[GIN-debug] GET /api/reviews --> backend/internal/interface/api/handler.Review.ListReviewsByProduct-fm (4 handlers)
[GIN-debug] POST /api/reviews --> backend/internal/interface/api/handler.Review.Create-fm (4 handlers)
[GIN-debug] GET /api/reviews/:review_id --> backend/internal/interface/api/handler.Review.Get-fm (4 handlers)
[GIN-debug] PUT /api/reviews/:review_id --> backend/internal/interface/api/handler.Review.Update-fm (4 handlers)
[GIN-debug] DELETE /api/reviews/:review_id --> backend/internal/interface/api/handler.Review.Delete-fm (4 handlers)
[GIN-debug] GET /auth/*path --> backend/internal/server.authHandler (2 handlers)
[GIN-debug] POST /auth/*path --> backend/internal/server.authHandler (2 handlers)
[GIN-debug] GET /swagger/*any --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (2 handlers)
2025/11/09 01:06:27 http: panic serving [::1]:40922: runtime error: invalid memory address or nil pointer dereference
goroutine 89 [running]:
net/http.(*conn).serve.func1()
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:1943 +0x14b
panic({0x228a840?, 0x3a35a70?})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/runtime/panic.go:783 +0x136
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequest(0x0, {0x2682b20, 0xc000d46000})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:55 +0x79
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequestWithBasicAuth(0x0, {0x2682b20, 0xc000d46000}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:85 +0x78
github.com/Nerzal/gocloak/v13.(*GoCloak).RetrospectToken(0x0, {0x2682b20, 0xc000d46000}, {0xc000084807, 0x3c6}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd}, {0xc0000482a9, ...})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:402 +0x10a
backend/internal/interface/api/middleware.(*authMiddleware).Handler.func1(0xc000d46000)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/auth.go:49 +0x430
github.com/gin-gonic/gin.(*Context).Next(0xc000d46000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*loggingMiddleware).Handler.func1(0xc000d46000)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/logging.go:28 +0xa5
github.com/gin-gonic/gin.(*Context).Next(0xc000d46000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*metricMiddleware).Handler.func1(0xc000d46000)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/metric.go:45 +0x4f
github.com/gin-gonic/gin.(*Context).Next(0xc000d46000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0002309c0, 0xc000d46000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 +0x42a
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0002309c0, {0x267fdc0, 0xc000d3c1e0}, 0xc000d22000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 +0xbc
net/http.serverHandler.ServeHTTP({0xc000206200}, {0x267fdc0, 0xc000d3c1e0}, 0xc000d22000)
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3340 +0x257
net/http.(*conn).serve(0xc000196750, {0x2682e28, 0xc0001b1b30})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:2109 +0x1ca5
created by net/http.(*Server).Serve in goroutine 1
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3493 +0x9d0
2025/11/09 01:06:27 http: panic serving [::1]:40926: runtime error: invalid memory address or nil pointer dereference
goroutine 92 [running]:
net/http.(*conn).serve.func1()
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:1943 +0x14b
panic({0x228a840?, 0x3a35a70?})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/runtime/panic.go:783 +0x136
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequest(0x0, {0x2682b20, 0xc000d46100})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:55 +0x79
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequestWithBasicAuth(0x0, {0x2682b20, 0xc000d46100}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:85 +0x78
github.com/Nerzal/gocloak/v13.(*GoCloak).RetrospectToken(0x0, {0x2682b20, 0xc000d46100}, {0xc000084c07, 0x3c6}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd}, {0xc0000482a9, ...})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:402 +0x10a
backend/internal/interface/api/middleware.(*authMiddleware).Handler.func1(0xc000d46100)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/auth.go:49 +0x430
github.com/gin-gonic/gin.(*Context).Next(0xc000d46100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*loggingMiddleware).Handler.func1(0xc000d46100)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/logging.go:28 +0xa5
github.com/gin-gonic/gin.(*Context).Next(0xc000d46100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*metricMiddleware).Handler.func1(0xc000d46100)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/metric.go:45 +0x4f
github.com/gin-gonic/gin.(*Context).Next(0xc000d46100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0002309c0, 0xc000d46100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 +0x42a
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0002309c0, {0x267fdc0, 0xc000d3c3c0}, 0xc000d22280)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 +0xbc
net/http.serverHandler.ServeHTTP({0xc000206200}, {0x267fdc0, 0xc000d3c3c0}, 0xc000d22280)
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3340 +0x257
net/http.(*conn).serve(0xc000196990, {0x2682e28, 0xc00020b270})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:2109 +0x1ca5
created by net/http.(*Server).Serve in goroutine 1
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3493 +0x9d0
2025/11/09 01:06:27 http: panic serving [::1]:40924: runtime error: invalid memory address or nil pointer dereference
goroutine 68 [running]:
net/http.(*conn).serve.func1()
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:1943 +0x14b
panic({0x228a840?, 0x3a35a70?})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/runtime/panic.go:783 +0x136
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequest(0x0, {0x2682b20, 0xc000122200})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:55 +0x79
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequestWithBasicAuth(0x0, {0x2682b20, 0xc000122200}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:85 +0x78
github.com/Nerzal/gocloak/v13.(*GoCloak).RetrospectToken(0x0, {0x2682b20, 0xc000122200}, {0xc000790407, 0x3c6}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd}, {0xc0000482a9, ...})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:402 +0x10a
backend/internal/interface/api/middleware.(*authMiddleware).Handler.func1(0xc000122200)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/auth.go:49 +0x430
github.com/gin-gonic/gin.(*Context).Next(0xc000122200)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*loggingMiddleware).Handler.func1(0xc000122200)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/logging.go:28 +0xa5
github.com/gin-gonic/gin.(*Context).Next(0xc000122200)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*metricMiddleware).Handler.func1(0xc000122200)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/metric.go:45 +0x4f
github.com/gin-gonic/gin.(*Context).Next(0xc000122200)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0002309c0, 0xc000122200)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 +0x42a
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0002309c0, {0x267fdc0, 0xc0006f81e0}, 0xc0006f6000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 +0xbc
net/http.serverHandler.ServeHTTP({0xc000206200}, {0x267fdc0, 0xc0006f81e0}, 0xc0006f6000)
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3340 +0x257
net/http.(*conn).serve(0xc00034f3b0, {0x2682e28, 0xc00020b180})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:2109 +0x1ca5
created by net/http.(*Server).Serve in goroutine 1
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3493 +0x9d0
2025/11/09 01:06:27 http: panic serving [::1]:49404: runtime error: invalid memory address or nil pointer dereference
goroutine 64 [running]:
net/http.(*conn).serve.func1()
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:1943 +0x14b
panic({0x228a840?, 0x3a35a70?})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/runtime/panic.go:783 +0x136
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequest(0x0, {0x2682b20, 0xc000122400})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:55 +0x79
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequestWithBasicAuth(0x0, {0x2682b20, 0xc000122400}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:85 +0x78
github.com/Nerzal/gocloak/v13.(*GoCloak).RetrospectToken(0x0, {0x2682b20, 0xc000122400}, {0xc000790807, 0x3c6}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd}, {0xc0000482a9, ...})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:402 +0x10a
backend/internal/interface/api/middleware.(*authMiddleware).Handler.func1(0xc000122400)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/auth.go:49 +0x430
github.com/gin-gonic/gin.(*Context).Next(0xc000122400)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*loggingMiddleware).Handler.func1(0xc000122400)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/logging.go:28 +0xa5
github.com/gin-gonic/gin.(*Context).Next(0xc000122400)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*metricMiddleware).Handler.func1(0xc000122400)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/metric.go:45 +0x4f
github.com/gin-gonic/gin.(*Context).Next(0xc000122400)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0002309c0, 0xc000122400)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 +0x42a
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0002309c0, {0x267fdc0, 0xc0006f83c0}, 0xc0006f6140)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 +0xbc
net/http.serverHandler.ServeHTTP({0xc000206200}, {0x267fdc0, 0xc0006f83c0}, 0xc0006f6140)
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3340 +0x257
net/http.(*conn).serve(0xc00015c120, {0x2682e28, 0xc0002fe0f0})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:2109 +0x1ca5
created by net/http.(*Server).Serve in goroutine 1
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3493 +0x9d0
2025/11/09 01:07:21 http: panic serving [::1]:32902: runtime error: invalid memory address or nil pointer dereference
goroutine 98 [running]:
net/http.(*conn).serve.func1()
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:1943 +0x14b
panic({0x228a840?, 0x3a35a70?})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/runtime/panic.go:783 +0x136
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequest(0x0, {0x2682b20, 0xc000122500})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:55 +0x79
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequestWithBasicAuth(0x0, {0x2682b20, 0xc000122500}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:85 +0x78
github.com/Nerzal/gocloak/v13.(*GoCloak).RetrospectToken(0x0, {0x2682b20, 0xc000122500}, {0xc000790c07, 0x3c6}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd}, {0xc0000482a9, ...})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:402 +0x10a
backend/internal/interface/api/middleware.(*authMiddleware).Handler.func1(0xc000122500)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/auth.go:49 +0x430
github.com/gin-gonic/gin.(*Context).Next(0xc000122500)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*loggingMiddleware).Handler.func1(0xc000122500)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/logging.go:28 +0xa5
github.com/gin-gonic/gin.(*Context).Next(0xc000122500)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*metricMiddleware).Handler.func1(0xc000122500)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/metric.go:45 +0x4f
github.com/gin-gonic/gin.(*Context).Next(0xc000122500)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0002309c0, 0xc000122500)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 +0x42a
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0002309c0, {0x267fdc0, 0xc0006f8780}, 0xc0006f6640)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 +0xbc
net/http.serverHandler.ServeHTTP({0xc000206200}, {0x267fdc0, 0xc0006f8780}, 0xc0006f6640)
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3340 +0x257
net/http.(*conn).serve(0xc00015c360, {0x2682e28, 0xc0002fe230})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:2109 +0x1ca5
created by net/http.(*Server).Serve in goroutine 1
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3493 +0x9d0
2025/11/09 01:07:21 http: panic serving [::1]:32914: runtime error: invalid memory address or nil pointer dereference
goroutine 102 [running]:
net/http.(*conn).serve.func1()
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:1943 +0x14b
panic({0x228a840?, 0x3a35a70?})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/runtime/panic.go:783 +0x136
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequest(0x0, {0x2682b20, 0xc000340100})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:55 +0x79
github.com/Nerzal/gocloak/v13.(*GoCloak).GetRequestWithBasicAuth(0x0, {0x2682b20, 0xc000340100}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:85 +0x78
github.com/Nerzal/gocloak/v13.(*GoCloak).RetrospectToken(0x0, {0x2682b20, 0xc000340100}, {0xc000034007, 0x3c6}, {0xc0000481bd, 0x7}, {0xc00004a251, 0xd}, {0xc0000482a9, ...})
/home/kevinnitro/go/pkg/mod/github.com/!nerzal/gocloak/[email protected]/client.go:402 +0x10a
backend/internal/interface/api/middleware.(*authMiddleware).Handler.func1(0xc000340100)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/auth.go:49 +0x430
github.com/gin-gonic/gin.(*Context).Next(0xc000340100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*loggingMiddleware).Handler.func1(0xc000340100)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/logging.go:28 +0xa5
github.com/gin-gonic/gin.(*Context).Next(0xc000340100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
backend/internal/interface/api/middleware.(*metricMiddleware).Handler.func1(0xc000340100)
/home/kevinnitro/projects/electricies/backend/internal/interface/api/middleware/metric.go:45 +0x4f
github.com/gin-gonic/gin.(*Context).Next(0xc000340100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 +0xab
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0002309c0, 0xc000340100)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 +0x42a
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0002309c0, {0x267fdc0, 0xc0003361e0}, 0xc0001ea000)
/home/kevinnitro/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 +0xbc
net/http.serverHandler.ServeHTTP({0xc000206200}, {0x267fdc0, 0xc0003361e0}, 0xc0001ea000)
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3340 +0x257
net/http.(*conn).serve(0xc00015c6c0, {0x2682e28, 0xc00020a0a0})
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:2109 +0x1ca5
created by net/http.(*Server).Serve in goroutine 1
/home/kevinnitro/.local/share/mise/installs/go/1.25.3/src/net/http/server.go:3493 +0x9d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment