Pricing Blog

Supabase returns 201 but no row is created

  • ssssadsadasd-1319415619967258675

    ssssadsadasd

    6 months ago

    Super weird situation that got me stuck.
    I want to insert a new supabase row and it returns a 201 (see pic). Also in the logs it shows that they were successful. The table has RLS disabled.
    However, no new row has been created in the table (as confirmed also by SQL queries).

    I have tried every possible configuration in the Toddle API but could not make it work. When I run the SQL in the Supabase dashboard it works though.

    any idea why this happens? thanks
    1319415620231757856-image.png
    1319415620588146882-image.png
  • lucasg-1319415838272389251

    Lucas G

    6 months ago

    What does the body look like
  • ssssadsadasd-1319417229909168200

    ssssadsadasd

    6 months ago

    it can be like this empty (see pic) or i could add {"id":4} but the result is the same
    1319417229611368581-image.png
  • ssssadsadasd-1319421316662694051

    ssssadsadasd

    6 months ago

    when I run it in postman it works. so it must be sth in toddle
  • ssssadsadasd-1319422578061873274

    ssssadsadasd

    6 months ago

    I tried creating new table starting from scratch etc but cant make this work
    1319422577181200506-image.png
    1319422577571266640-image.png
    1319422577915068480-image.png
  • ssssadsadasd-1319424818088640593

    ssssadsadasd

    6 months ago

    1319424817283207215-image.png
    1319424817539190815-image.png
    1319424817870409759-image.png
  • lucasg-1319426052103340125

    Lucas G

    6 months ago

    That body is not an empty object, it is a string
    1
  • ssssadsadasd-1319426203471319070

    ssssadsadasd

    6 months ago

    @Lucas G life saver. thanks again
  • lucasg-1319426226984849409

    Lucas G

    6 months ago

    Any reason you are hard-coding the bearer token? If it's for testing then disregard
  • ssssadsadasd-1319426290062856313

    ssssadsadasd

    6 months ago

    yes, just for testing. just wanted to try any combination
    👍1