Skip to content

Getting 406s in network logs if .maybeSingle() returns no result #361

Closed
@probablykasper

Description

@probablykasper

Bug report

Describe the bug

When selecting using .maybeSingle(), I'm getting an error logged to console if there's 0 rows returned. There's no error if I remove .maybeSingle(), and there's no error if a row is returned.

To be clear, the query still returns successfully.

image

The stack trace seems to points to this line (probably a bad source map):

count = parseInt(contentRange[1])

To Reproduce

	const profileResult = await supabaseClient
		.from('profiles')
		.select()
		.eq('id', session.user.id)
		.maybeSingle()

System information

  • OS: macOS
  • Browser: Brave
  • Version of supabase-js: 2.0.4
  • Version of Node.js: 16.15.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions