What version of Go are you using (go version)?
$ go version 1.20.3
Does this issue reproduce with the latest release?
When using method client.GetAuthorization , it will panic unmarshal field authorization: json: cannot unmarshal object into Go struct field Challenge.Challenges.Error of type error
response data
{
"identifier": {
"type": "dns",
"value": "example.com"
},
"status": "invalid",
"expires": "2023-06-01T01:13:43Z",
"challenges": [
{
"type": "dns-01",
"status": "invalid",
"error": {
"type": "urn:ietf:params:acme:error:unauthorized",
"detail": "No TXT record found at _acme-challenge.example.com",
"status": 403
},
"url": "-",
"token": "-",
"validated": "2023-05-25T05:30:57Z"
}
]
}
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
should fix it, this shouldn't panic.
Comment From: seankhliao
I don't see how this is possible. It should only be decoded into wire* types like wireError, not a generic error field https://go.googlesource.com/crypto/+/c0531f9c34514ad5c5551e2d6ce569ca673a8afd/acme/types.go#551