Skip to content

GetDynamicSecretValue returns error when unmarshaling a secret #13

@xorxsan

Description

@xorxsan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions