Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(*models.Error) is not supported by the TextConsumer #236

Open
jaredpiedt opened this issue May 21, 2020 · 0 comments
Open

(*models.Error) is not supported by the TextConsumer #236

jaredpiedt opened this issue May 21, 2020 · 0 comments

Comments

@jaredpiedt
Copy link

When creating a site using the Netlify terraform provider, I get this error:

&{0 } (*models.Error) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface

I attempted to create the site via cURL to get more visibility into the API response:

Request

curl -X POST \
  https://api.netlify.com/api/v1/sites \
  -H 'Authorization: Bearer <secret>' \
  -H 'Content-Type: application/json' \
  -d '{
	"name": "test",
	"repo": {
		"provider": "github",
		"repo_path": "jaredpiedt/test",
		"repo_branch": "master"
	}
}'

Response

HTTP/1.1 422 Unprocessable Entity

{
    "errors": {
        "subdomain": [
            "must be unique"
        ]
    }
}

I believe the issue is a result of the response not matching the error schema specified in swagger.yml: https://github.com/netlify/open-api/blob/master/swagger.yml#L2777-L2787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant