Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Error 'All object keys must match' #173

@peachp

Description

@peachp

Bug report

Describe the bug

When trying to insert an array of objects, where in some objects the key field2 is present, and in others isn't, the JS API client errors to: 'All object keys must match'. The field2 is not mandatory.

const { data, error } = await supabase
  .from('mytable')
  .insert([
    {
      field1: 'something'     
    },
    {
      field1: 'something',
      field2: 'something'        
    }      
])

Desired behavior

The JS client / Supabase should default the mismatching fields to null or whatever is translated to NULL in Postgres. (As workaround I set the fields to null and it looks OK in my case.)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions