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

jsonDecode on Empty String #131

Closed
MelbourneDeveloper opened this issue Sep 14, 2023 · 3 comments
Closed

jsonDecode on Empty String #131

MelbourneDeveloper opened this issue Sep 14, 2023 · 3 comments

Comments

@MelbourneDeveloper
Copy link

I just upgraded to http ^1.1.0. It looks like it's not compatible with the Postgres SDK V1.5.0

The endpoint returns 204 with an empty body, but the code tries to parse the response.

image

The problem is happening in _parseResponse. You can see that the body is empty string here.

image

It was a query for a table with an eq on the ID column. The method is PATCH. The content length here is actually 0, so it should be hitting a different code path I would say.

@isoos
Copy link
Owner

isoos commented Sep 14, 2023

@MelbourneDeveloper: I'm not sure if this is relevant for the postgres package - it doesn't depend on package:http and we don't deal with any HTTP request. I think this issue belongs to another package/project.

@MelbourneDeveloper
Copy link
Author

@MelbourneDeveloper: I'm not sure if this is relevant for the postgres package - it doesn't depend on package:http and we don't deal with any HTTP request. I think this issue belongs to another package/project.

Ah, sorry!

I assumed the Supabase library depended on this library, but it turns out it doesn't. I will log this with Supabase. Thanks!

@isoos isoos closed this as completed Sep 15, 2023
@MelbourneDeveloper
Copy link
Author

MelbourneDeveloper commented Sep 16, 2023

@isoos

Just to explain, the package was PostgREST. I misread the package name, and that's why this ended up here.

I moved the issue here for people Googling this

supabase/supabase-flutter#627

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

2 participants