# Supabase Update call || Media Types?

**URL:** <https://community.weweb.io/t/supabase-update-call-media-types/10197>\
**Category:** Ask us anything\
**Tags:** supabase\
**Created:** [August 11, 2024, 8:21pm UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197 "2024-08-11T20:21:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![samtay32](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@samtay32](https://community.weweb.io/u/samtay32)\
**Post date:** [August 11, 2024, 8:21pm UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/1 "2024-08-11T20:21:08Z")

</div>

On sign up, I’m trying to call the supabase UPDATE function to update the user\_type column inside of public.users

After the signup function fires successfully, I call the UPDATE function and get this error:

> name: “Error”
> 
> stack: “Error: None of these media types are available: application/vnd.pgrst.plan+text; for=“application/json”; options=analyze|verbose|settings|buffers|wal at Object.update ([https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/cbf0fa51-0d70-4b1a-9cbe-faaac964c494/dist/manager.js:1:223715](https://cdn.weweb.io/components/f9ef41c3-1c53-4857-855b-f2f6a40b7186/cbf0fa51-0d70-4b1a-9cbe-faaac964c494/dist/manager.js:1:223715)) at async S ([https://editor-cdn.weweb.io/public/js/index.a50a95e3.js:1:426259](https://editor-cdn.weweb.io/public/js/index.a50a95e3.js:1:426259))”
> 
> message: “None of these media types are available: application/vnd.pgrst.plan+text; for=“application/json”; options=analyze|verbose|settings|buffers|wal”
> 
> cause
> 
> code: “PGRST107”
> 
> details: null
> 
> hint: null
> 
> message: “None of these media types are available: application/vnd.pgrst.plan+text; for=“application/json”; options=analyze|verbose|settings|buffers|wal”

Any suggestions on what I’m doing wrong?

 ![Image 8-11-24 at 4.12 PM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/fafa3638a1d963bc297de94ddadbbc8ff2825c1e.jpeg)  
 ![Image 8-11-24 at 4.14 PM (1)](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/4689acde47469bda2fe7b2ee82774e76c94fab2d.jpeg)  
 ![Image 8-11-24 at 4.14 PM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f38be6e8e8f062d74e24aa0226c343faf22dd21b.jpeg)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [August 11, 2024, 9:04pm UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/2 "2024-08-11T21:04:02Z")

</div>

Do you by any chance have the “explain” option turned on in your Update query? If this is the case, that’s most probably what is causing the issue.

 ![Screenshot 2024-08-11 at 23.04.39](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0162dd91e9e8b01b600b0b760f273f0f8e7ed7eb.png)

---

<div class="post-metadata">

**Author:** ![samtay32](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@samtay32](https://community.weweb.io/u/samtay32)\
**Post date:** [August 11, 2024, 10:18pm UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/3 "2024-08-11T22:18:02Z")

</div>

No sir. I turned it on to get information back to try and trouble shoot. Without out it, it just returns succeeded and null.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [August 12, 2024, 3:18am UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/4 "2024-08-12T03:18:17Z")

</div>

Well, it causes your error, so you either need to set it up properly, or disable it…

---

<div class="post-metadata">

**Author:** ![samtay32](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@samtay32](https://community.weweb.io/u/samtay32)\
**Post date:** [August 12, 2024, 4:18am UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/5 "2024-08-12T04:18:35Z")

</div>

There’s a misunderstanding.

I turned it on ‘after’ realizing the UPDATE fired but didn’t update public.users.user\_type from ‘guest’ to ‘host’.

I figure that would provide some logs to assist me in problem-solving.

As you can see, the table is correct, id is bound properly to identify the appropriate row, and “host” is bound properly to be the string to replace guest.

Am I missing something?

---

<div class="post-metadata">

**Author:** ![thomlov](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thomlov/32/8591_2.png) [@thomlov](https://community.weweb.io/u/thomlov)\
**Post date:** [August 12, 2024, 5:44am UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/6 "2024-08-12T05:44:55Z")

</div>

Check your RLS policy on the users table, that it allows update

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [August 12, 2024, 10:16am UTC](https://community.weweb.io/t/supabase-update-call-media-types/10197/7 "2024-08-12T10:16:17Z")

</div>

> [@samtay32](#):
>
> message: “None of these media types are available: application/vnd.pgrst.plan+text; for=“application/json”; options=analyze|verbose|settings|buffers|wal”

This error is caused by explain, the not updating issue is most probably caused by an incorrect RLS setup as @thomlov already said.
