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

Fix failure to unmarshal closed response body

Open christopher-besch opened this issue 2 years ago • 0 comments

What type of PR is this?

  • bug

When doing a POST /jira/rest/servicedeskapi/request HTTP/1.1 I sometimes get this error:

2023/01/31 15:24:25 json: cannot unmarshal array into Go struct field RequestFieldValue.requestFieldValues.value of type string: http: read on closed response body
exit status 1

This PR fixes that issue (reference: https://stackoverflow.com/questions/47723193/panic-json-cannot-unmarshal-array-into-go-value-of-type-main-structure).

christopher-besch avatar Jan 31 '23 14:01 christopher-besch