Error: apiRequestContext.get: getaddrinfo ENOTFOUND Playwright

I’m trying to execute this API test:

import { test } from "@playwright/test";

test("health check request", async ({ request }) => {
  await request.get(`<my-url>`);
});

When I execute this test I’m getting Error: apiRequestContext.get: getaddrinfo ENOTFOUND <my-url> error.

Full Error Message:

Error: apiRequestContext.get: getaddrinfo ENOTFOUND <my-url>
Call log:
  - → GET <my-url>
  -   user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.17 Safari/537.36
  -   accept: /
  -   accept-encoding: gzip,deflate,br


    at testsexample.spec.ts:4:17

I’ve tried with demo apps and then the test ran just fine, so my machine probably OK.

From what I’ve found about this error message it looks like node related error, but as I’ve already mentioned, I’ve tested with other demo API apps and no error occur.