Skip to content

single() returns Invalid media type: expected no more input. #921

Open
@Mykyta-Chernenko

Description

@Mykyta-Chernenko

Describe the bug
When single() doesn't find anything, I get "Invalid media type: expected no more input."

full error
flutter: Event: MatchError, Properties: {error: Error on line 1, column 32: Invalid media type: expected no more input.

1 │ application/json; charset=utf-8,application/vnd.pgrst.object+json; charset=utf-8
│ ^
╵}
flutter: Error fetching match: Error on line 1, column 32: Invalid media type: expected no more input.

1 │ application/json; charset=utf-8,application/vnd.pgrst.object+json; charset=utf-8
│ ^

To Reproduce
Steps to reproduce the behavior:

  1. install supabase_flutter: ^2.5.1
  2. try to call do something as
    await supabase
    .from('profile')
    .select()
    .eq('id', 'gibberish')
    .single();
  3. See error

Expected behavior
Some ordinary exception as "not found"

Version (please complete the following information):
├── supabase_flutter 2.5.1
│ ├── supabase 2.1.1
│ │ ├── functions_client 2.0.0
│ │ ├── gotrue 2.6.0
│ │ ├── postgrest 2.1.1
│ │ ├── realtime_client 2.0.4
│ │ ├── storage_client 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpostgrestThis issue or pull request is related to postgrest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions