hanzoai / gochimp3

🐒 Golang client for MailChimp API 3.0.

Home Page:https://github.com/zeekay/gochimp3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"unexpected end of JSON input" is not necessary an API error when status is 204

nferruzzi opened this issue · comments

Hi,

there is a JSON decode error reported by mistake from the function

func (api API) CreateAutomationEmailQueue(workflowID, emailID, emailAddress string) (*AutomationQueue, error) {

basically the Request function attempts to decode and empty body (status 204) as a json and fails with the error unexpected end of JSON input.

But the status is 204 and is ok to be empty, could you please avoid the unmarshalling or make it a non error with status 204 ?

thanks

Thanks for fixing that!