-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The CreateStoreExecute method in client/client.go calls request.GetBody().Name without checking whether GetBody() returns nil, which can cause a panic.
Also there are other methods with the same issue - go through them and make sure any that need fixing is fixed.
Recommendation
Add validation to check if request.GetBody() is nil before accessing Name. If nil, return a FgaRequiredParamError with param "body" to provide a graceful error instead of a nil-dereference panic. Add tests to cover the scenarios that body is nil for all relevant methods
References
- PR: feat: support per-request headers options #233
- Comment: feat: support per-request headers options #233 (comment)
- Requested by: @rhamzeh
Location
File: client/client.go
Lines: ~691-705 (CreateStoreExecute function)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Intake