© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3w ago•
14 replies
CryptoWabbit

HTTP 400 and PostgREST; error=42703

🟢SQL
create or replace function increment_referral_earnings(
p_wallet text,
p_amount numeric
)
returns void as $$
begin
update public.users
set
total_earned = total_earned + p_amount,
total_referrals = total_referrals + 1,
updated_at = now()
where wallet_address = p_wallet;
end;
$$ language plpgsql security definer;

GRANT EXECUTE ON FUNCTION increment_referral_earnings(
p_wallet text,
p_amount numeric
) TO authenticated;

select * from rpc('increment_referral_earnings, {"p_wallet": "TEST", "p_amount": 1}');

Giving me ERROR: 42883: function rpc(unknown) does not exist in the Editor and PostgREST; error=42703 in the API Gateway

Must be missing something here.
It's created in the public schema, I can see it as a function in the DB manager and I have looked into the API docs, seems all good in there.
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

404 and PostgREST; error=PGRST205
SupabaseSSupabase / help-and-questions
3w ago
PostgresT, 520 error and 40s delays.
SupabaseSSupabase / help-and-questions
5mo ago
Stripe webhooks rejected HTTP 400
SupabaseSSupabase / help-and-questions
2mo ago
PostgREST
SupabaseSSupabase / help-and-questions
6mo ago