Skip to content

Conversation

Vinzent03
Copy link
Collaborator

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

A FormatException is thrown on when trying to parse an empty body

What is the new behavior?

The empty body is caught and no decoding is happening.

Additional context

#627

@@ -212,7 +212,9 @@ class PostgrestBuilder<T, S> implements Future<T> {
int? count;

if (response.request!.method != METHOD_HEAD) {
if (response.request!.headers['Accept'] == 'text/csv') {
if (response.bodyBytes.isEmpty) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vinzent03, this looks like it will address the exception. Exceptions do interrupt the debugging flow when there is actually nothing exceptional happening.

Thanks

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 this pull request may close these issues.

4 participants