You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Network Error
at createError (node_modules/axios/lib/core/createError.js:16:15)
at XMLHttpRequest.handleError (node_modules/axios/lib/adapters/xhr.js:83:14)
at XMLHttpRequest.<anonymous> (node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js:32:32)
at innerInvokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:318:25)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
...
console.error
Error: Cross origin http://localhost forbidden
at dispatchError (/Users/marek/Workspace/apify-status-page/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:62:19)
at Object.validCORSHeaders (/Users/marek/Workspace/apify-status-page/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:74:5)
at receiveResponse (/Users/marek/Workspace/apify-status-page/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:796:19)
...
I have a simple jest test that uses Apify client:
Which fails with the following error
After doing some experiments I found out that it works when the test is executed in a Node environment with
So I updated test to simply do an Axios request as Axios is used in the client
and it returned a following error
which is not probably handled properly in Apify Client. The problem happens here https://github.com/apify/apify-client-js/blob/master/src/http_client.js#L116 where the response has an empty body but doesn't contain an error so it gets returned:
The text was updated successfully, but these errors were encountered: