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

Form deletion throws error #32

Closed
mlaigre opened this issue May 6, 2019 · 2 comments
Closed

Form deletion throws error #32

mlaigre opened this issue May 6, 2019 · 2 comments

Comments

@mlaigre
Copy link

mlaigre commented May 6, 2019

Hello,

Deleting a form throw the following error:

FetchError: invalid json response body at https://api.typeform.com/forms/Uq4A3F reason: Unexpected end of JSON input

Am I wrong or 204 No Content responses are not handled ?

@anabellaspinelli
Copy link

anabellaspinelli commented May 8, 2019

Hey @mlaigre!

I guess this error has to do with this line

.then(response => response.json())
.catch(error => { throw new Error(error) })

I'm not officially the maintainer but maybe I can help. Would you expect a return value in the case of no content or that it just doesn't catch?

@mlaigre
Copy link
Author

mlaigre commented May 9, 2019

It's look to be the point of failure. As the API returns a 204, we expect an empty return not a failure.

I will submit a PR next week.

picsoung added a commit that referenced this issue Aug 20, 2019
feat(axios): move from fetch to axios, fixes #19 #32
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

Successfully merging a pull request may close this issue.

3 participants