Lara
Lara2d ago

TypeError: error sending request for URL! (Deno -Supabase - Oak)

Hi team, I am struggling to use Deno with oak for my project and have this issue:
Error : 500 Internal Server Error!
{
"error": {
"type": "database_error",
"message": "TypeError: error sending request for url (http://127.0.0.1:54321/rest/v1/user_meta?select=*)",
"errors": [
"TypeError: error sending request for url (http://127.0.0.1:54321/rest/v1/user_meta?select=*)\n at async mainFetch (ext:deno_fetch/26_fetch.js:170:12)\n at async fetch (ext:deno_fetch/26_fetch.js:391:7)\n at async file:///Users/lara/doctorsRep/doctors/supabase/functions/doctors/routes/v1/user/userRouter.ts:11:27\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async errorMiddleware (file:///Users/lara/doctorsRep/doctors/supabase/functions/doctors/lib/middlewares/error.ts:7:5)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async corsMiddleware (file:///Users/lara/doctorsRep/doctors/supabase/functions/doctors/lib/middlewares/cors.ts:5:3)"
]
}
}
Error : 500 Internal Server Error!
{
"error": {
"type": "database_error",
"message": "TypeError: error sending request for url (http://127.0.0.1:54321/rest/v1/user_meta?select=*)",
"errors": [
"TypeError: error sending request for url (http://127.0.0.1:54321/rest/v1/user_meta?select=*)\n at async mainFetch (ext:deno_fetch/26_fetch.js:170:12)\n at async fetch (ext:deno_fetch/26_fetch.js:391:7)\n at async file:///Users/lara/doctorsRep/doctors/supabase/functions/doctors/routes/v1/user/userRouter.ts:11:27\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async errorMiddleware (file:///Users/lara/doctorsRep/doctors/supabase/functions/doctors/lib/middlewares/error.ts:7:5)\n at async dispatch (https://deno.land/x/oak@v11.1.0/middleware.ts:18:7)\n at async corsMiddleware (file:///Users/lara/doctorsRep/doctors/supabase/functions/doctors/lib/middlewares/cors.ts:5:3)"
]
}
}
Already created a repository and added all the info you need to reproduce it Link :https://github.com/Ge6ben/custom-route-oka
GitHub
GitHub - Ge6ben/custom-route-oka
Contribute to Ge6ben/custom-route-oka development by creating an account on GitHub.
No description
3 Replies
bartlomieju
bartlomieju2d ago
This doesn't look like a Deno error. From what i can say it uses locally supabase runtime which is based on Deno but is not Deno. Sort of looks like they are using outdated version of Deno's Rust crates. I think it'd be better if you reached out to Suoabase support for help here.
Lara
Lara2d ago
Hi @bartlomieju thank you for your response I did as well but still i could not fix Check My request in Supabase channal: https://discord.com/channels/839993398554656828/1289490533911363655/1289490533911363655 Thank you @bartlomieju The supabase team helped me to solve it here's the url for anyone will get the same issue in the future! https://discord.com/channels/839993398554656828/1289490533911363655/1291776314369376357
bartlomieju
bartlomieju2d ago
Great!