Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
fetch keeps giving me TypeError: Callback returned incorrect type; expected 'Promise' - Cloudflare Developers
CD
Cloudflare Developers
•
4y ago
•
2 replies
captain
fetch keeps giving me TypeError: Callback returned incorrect type; expected 'Promise'
I am in the middle of converting my service worker to a module app
. I am able to publich but when getting to running it
, when it hits
:
const resp
= await fetch
(
'
https://csprng.xyz/v1/api
'
)
I get the following error in my tail logs
:
TypeError
: Callback returned incorrect type
; expected
'Promise
'
Would anybody have any idea why this is happening and how to resolve
? I am running wrangler 2
.8
.1
Appreciate the tips
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Supabase : Uncaught (in promise) TypeError: Incorrect type for Promise: the Promise did not resolve
CD
Cloudflare Developers / workers-and-pages-help
15mo ago
Incorrect type for Promise: the Promise did not resolve to 'Response'.
CD
Cloudflare Developers / workers-and-pages-help
3y ago
Getting `TypeError: fetch failed` errors
CD
Cloudflare Developers / workers-and-pages-help
2y ago
check if fetch request returned a cached response?
CD
Cloudflare Developers / workers-and-pages-help
2y ago