go-kong icon indicating copy to clipboard operation
go-kong copied to clipboard

rbac_user_service to add return status code

Open reskin89 opened this issue 11 months ago • 1 comments

In this code it would be nice to update the func signature to something like:

func (s *RBACUserService) Get(ctx context.Context,
	nameOrID *string,
) (*RBACUser, int, error) {

where int is the status code returned from the kong api.

It makes handling of certain error scenarios when importing this library a lot easier to manage and tailor toward the importing application.

reskin89 avatar Mar 27 '24 10:03 reskin89

I'll add here that it's probably a good idea in this situation if accepted, that the status code or certain other pieces of the response body as an object are returned if desired.

reskin89 avatar Mar 27 '24 14:03 reskin89