hashicorp / hashicorp/vault-client-go

PkiReadIssuerPem - Parse response error

Open
#264 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
133
Forks
23
PR merge metrics
No merged PRs in 30d

Description

# Expected Behavior

I'm trying to fetch an Issuer pem calling PkiReadIssuerPem.
i'm expecting to fetch the PEM

# Current Behavior

What is the current behavior?
i'm getting the error : " invalid character '-' in numeric literal"

# Failure Information

Please include the version of Vault binary and the version of `vault-client-go` you're using.
The framework calls "func parseResponse[T any](responseBody io.Reader) (*Response[T], error) {"
and this for any calls, but when receiving the PEM, the endpoint send it not in JSON format
so when it tries to unmarshal it, it crashes.

## Steps to Reproduce

Please provide detailed steps for reproducing the issue.

1. Add an issuer in vault
2. Call PkiReadIssuerPem with the issuer id
...

# Additional Information

Contributor guide

Open the contributing guide

Research direction

Start at parseResponse[T any], which the issue identifies as the failing entry point, and trace how PkiReadIssuerPem handles the issuer PEM response. Confirm the endpoint's non-JSON response shape and reproduce the invalid numeric literal error. Done means PkiReadIssuerPem can return the PEM without the generic JSON parsing failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.