-
Notifications
You must be signed in to change notification settings - Fork 10
Auth resource return an error when retrieving invalid auth resources ID #11
Copy link
Copy link
Open
Labels
Type/BugIdentifies a bug in the projectIdentifies a bug in the project
Description
Bellow error throws when fetching invalid auth resources, in {{baseUrl}}/consents/:consentId/authorizations/:authorizationId path
time=2026-02-25T08:47:58.794+05:30 level=WARN msg="Client error occurred" correlation-id=5e51ee9c-a7ba-44cc-8abd-54cc122ce1f6 code=AR-4040 message="Authorization resource not found" description="auth resource 9fc8dde3-7baa-480a-86e6-d11e7584d9a1 does not belong to consent string" http_status=404
2026/02/25 08:48:14 http: panic serving 127.0.0.1:54999: runtime error: invalid memory address or nil pointer dereference
goroutine 107 [running]:
net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1943 +0xb4
panic({0x10475c220?, 0x104a271a0?})
/usr/local/go/src/runtime/panic.go:783 +0x120
github.com/wso2/openfgc/internal/authresource.(*authResourceService).GetAuthResource(0x14000060168, {0x1047cf138, 0x14000176570}, {0x140005880c9, 0x24}, {0x14000588095, 0x24}, {0x14000582610, 0x6})
/Users/hasithan/Projects/wso2/openfgc/consent-server/internal/authresource/service.go:242 +0x180
github.com/wso2/openfgc/internal/authresource.(*authResourceHandler).handleGet(0x14000012f20, {0x1047cecc0, 0x140003160f0}, 0x14000000c80)
/Users/hasithan/Projects/wso2/openfgc/consent-server/internal/authresource/handler.go:126 +0x1ac
net/http.HandlerFunc.ServeHTTP(0x14000130180?, {0x1047cecc0?, 0x140003160f0?}, 0x10?)
/usr/local/go/src/net/http/server.go:2322 +0x38
net/http.(*ServeMux).ServeHTTP(0x14000176510?, {0x1047cecc0, 0x140003160f0}, 0x14000000c80)
/usr/local/go/src/net/http/server.go:2861 +0x190
main.setupHTTPServer.WrapWithCorrelationID.CorrelationIDMiddleware.func1({0x1047cecc0, 0x140003160f0}, 0x14000000b40)
/Users/hasithan/Projects/wso2/openfgc/consent-server/internal/system/middleware/correlationid.go:57 +0xec
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1047cecc0?, 0x140003160f0?}, 0x140002cfb50?)
/usr/local/go/src/net/http/server.go:2322 +0x38
net/http.serverHandler.ServeHTTP({0x140002fae00?}, {0x1047cecc0?, 0x140003160f0?}, 0x1?)
/usr/local/go/src/net/http/server.go:3340 +0xb0
net/http.(*conn).serve(0x140003818c0, {0x1047cf138, 0x140001882d0})
/usr/local/go/src/net/http/server.go:2109 +0x528
created by net/http.(*Server).Serve in goroutine 19
/usr/local/go/src/net/http/server.go:3493 +0x384
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type/BugIdentifies a bug in the projectIdentifies a bug in the project