B
BuildShip
C
BuildShip
•
3y ago
•
8 replies
carpediemus
weatherapi problem
Trying to fetch weather data from weatherapi
, the ai wrote me a code
:
import fetch from
'node
-fetch
'
;
export default async function fetchWeatherForecast
(
{
cityName
,
apiKey
}
)
{
const url
=
https://api.weatherapi.com/v1/forecast.json?key={apiKey}&q={cityName}&days=3
https://api.weatherapi.com/v1/forecast.json?key={apiKey}&q={cityName}&days=3
;
const response
= await fetch
(url
)
;
const data
= await response
.json
(
)
;
return data
;
}
But i keep getting an error whenever i try to test the call
.
Running the url with the api key in the browser returns the results without an issue
.
{
"error
"
:
{
"message
"
:
"An error occurred while fetching
: TypeError
[ERR
_INVALID
_URL
]
: Invalid URL
"
}
,
"label
"
:
"build node
"
,
"message
"
:
"An error occurred while fetching
: TypeError
[ERR
_INVALID
_URL
]
: Invalid URL
"
}
I am just starting out with buildship so any help would be appreciated
.
BuildShip
Join
Join founders, builders, devs using Low-code / No-code to create backend, APIs, scheduled Jobs, automation, AI workflows
7,971
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
FlutterFlow Buildship CORS Problem
W
Willy / ❓・buildship-help
10mo ago
Loop problem with supabase
B
Burak Dönertaş / ❓・buildship-help
2y ago
Problem Streaming OpenAI Assistant
A
Artus / ❓・buildship-help
2y ago
Problem with team project
V
vitoria / ❓・buildship-help
2y ago