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

GetDynamicSecretValue returns error when unmarshaling a secret #13

Open
xorxsan opened this issue Oct 25, 2023 · 1 comment
Open

GetDynamicSecretValue returns error when unmarshaling a secret #13

xorxsan opened this issue Oct 25, 2023 · 1 comment

Comments

@xorxsan
Copy link

xorxsan commented Oct 25, 2023

Hi,

The following piece of code is returning json: cannot unmarshal number into Go value of type string:

	secret, _, err := a.client.GetDynamicSecretValue(ctx).
		Body(akeyless.GetDynamicSecretValue{
			Name:  name,
			Token: &token,
		}).Execute()

The json returned by the dynamic secret looks like this:

{
  "access_token": "an-access-token",
  "expiration": <number>
}

Strangely for me, this works using the akeyless-cli.

Would it be possible to have the Execute() function return map[string]any? Or maybe using generics like Execute()(T, error)?

Thanks.

@xorxsan
Copy link
Author

xorxsan commented Feb 26, 2024

Any updates on this?

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