Skip to content

ExperimentalWarning: The Fetch API is an experimental feature. #90

@borodadada

Description

@borodadada

Hi! I created error, but i dont understand why node js down?

            const url = 'http://api.weatherapi.com/v1/forecast.json?key=11acc57138bfc45a7abc190229221306&q='+ 'Miami' +'&days=1&aqi=no&alerts=no'
            await $fetch(url, {
                async onResponseError({ request, options, error }) {
                    console.log('ERROR')
                },
                async onResponse({ request, response, options }) {
                    resolve(response)
                }
            })

console

(node:12836) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/process/task_queues:95
    runMicrotasks();
    ^

FetchError: 401 Unauthorized (http://api.weatherapi.com/v1/forecast.json?key=11acc57138bfc45a7abc190229221306&q=Miami&days=1&aqi=no&alerts=no)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async D:\js\megadub_server\server\ts\weather\index.js:47:13

Node.js v18.2.0
[nodemon] app crashed - waiting for file changes before starting...

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions