Ā© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
5 replies
Beteer

Success updating with status 204, but logged data is null

I was updating a row, it was successfully updated, but when i log the result, the data is null.

here's my code:

model
updateExperience: (id, title, company, detail, startDate, endDate) =>
    new Promise((resolve, reject) => {
      supabase
        .from("experience")
        .update({
          title,
          company,
          detail,
          start_date: startDate,
          end_date: endDate,
        })
        .eq("id", id)
        .then((result) => {
          if (!result.error) {
            resolve(result);
          } else {
            reject(result);
          }
        });
    }),
updateExperience: (id, title, company, detail, startDate, endDate) =>
    new Promise((resolve, reject) => {
      supabase
        .from("experience")
        .update({
          title,
          company,
          detail,
          start_date: startDate,
          end_date: endDate,
        })
        .eq("id", id)
        .then((result) => {
          if (!result.error) {
            resolve(result);
          } else {
            reject(result);
          }
        });
    }),


and in controller:
const result = await experienceModel.updateExperience(
        experienceId,
        title,
        company,
        detail,
        startDate,
        endDate
      );
const result = await experienceModel.updateExperience(
        experienceId,
        title,
        company,
        detail,
        startDate,
        endDate
      );


when i log the result:
{
  error: null,
  data: null,
  count: null,
  status: 204,
  statusText: 'No Content'
}
{
  error: null,
  data: null,
  count: null,
  status: 204,
  statusText: 'No Content'
}


when i check the table, data is updated but the log didn't show it. i do the same way in my last project, and it was fine.
supabase204.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

User null in middleware but im logged in
SupabaseSSupabase / help-and-questions
2y ago
data is NOT updating
SupabaseSSupabase / help-and-questions
4y ago
DATA IS NOT UPDATING
SupabaseSSupabase / help-and-questions
4y ago
updating user returning null
SupabaseSSupabase / help-and-questions
4y ago