# Node-sdk; Management Client; FetchError: The request failed and the interceptors did not return an alternative response

**URL:** <https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714>\
**Category:** Get Help\
**Tags:** management-api, roles\
**Created:** [April 24, 2024, 12:58pm UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714 "2024-04-24T12:58:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhuber](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rhuber/32/33291_2.png) [@rhuber](https://community.auth0.com/u/rhuber)\
**Post date:** [April 24, 2024, 12:58pm UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714/1 "2024-04-24T12:58:53Z")

</div>

There are some methods from the Management Client failing and returning this error:

```auto
FetchError: The request failed and the interceptors did not return an alternative response
    at BaseAPI.fetch (/.../api/node_modules/auth0/dist/cjs/lib/runtime.js:84:27)
    at async OAuth.request (/.../api/node_modules/auth0/dist/cjs/lib/runtime.js:115:26)
    at async grant (/.../api/node_modules/auth0/dist/cjs/auth/base-auth-api.js:84:22) {
  cause: TypeError: Cannot construct a Request with a Request object that has already been used.
      at node:internal/deps/undici/undici:12618:11
      at propagateAslWrapper (/.../api/node_modules/async-listener/index.js:504:23)
      at /.../api/node_modules/async-listener/glue.js:188:31
      at /.../api/node_modules/async-listener/index.js:541:70
      at /.../api/node_modules/async-listener/glue.js:188:31
}

```

Here is a snippet that is throwing the error:

```auto
export const getPermissionsManagementConfigs = async (clientId: number) => {
    try {
        const { managementConfigs } = (await configs({
            clientId,
        })) as IAuth0Config;

        console.log('managementConfigs: ', managementConfigs);

        // const { domain, audience, clientSecret } = managementConfigs;

        const client = new ManagementClient({
            domain: ' **** ,
            clientId: ' ****',
            clientSecret:
                ' ****',
        });

        console.log('client: ', client.roles);

        const { data: roles } = await client.roles.getAll().catch(err => {
            console.log('error getting roles: ', err);
            throw new Error('ERROR GETTING ROLES');
        });

        return { client, roles, managementConfigs };
    } catch (err) {
        const error = processError(err);
        throw new Error(
            `ERROR GETTING PERMISSIONS MANAGEMENT CONFIGS: ${error}`,
        );
    }
};

```

\*\*\*IMPORTANT \*\*\*  
_ **The `domain`, `clientId`, and `clientSecret` have been triple checked for correctness.** _

The error seems to indicated that the sdk library is trying reuse a Request object.

Are there any solutions to this?

---

<div class="post-metadata">

**Author:** ![everett](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@everett](https://community.auth0.com/u/everett)\
**Post date:** [April 25, 2024, 9:36am UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714/2 "2024-04-25T09:36:05Z")

</div>

Hey, did you find a solution to this yet? I’m experiencing this issue as well.

---

<div class="post-metadata">

**Author:** ![rhuber](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rhuber/32/33291_2.png) [@rhuber](https://community.auth0.com/u/rhuber)\
**Post date:** [April 25, 2024, 11:04am UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714/3 "2024-04-25T11:04:16Z")

</div>

Yes! Our problem was another package actually, dd-trace. They pushed a minor update 5.10.xx to 5.11.xx. In it, they introduced a bug that was improperly handling the global.fetch Request and allowing it to be reused. We rolled back our version and the problem is resolved.

---

<div class="post-metadata">

**Author:** ![crummy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/crummy/32/56948_2.png) [@crummy](https://community.auth0.com/u/crummy)\
**Post date:** [May 8, 2024, 1:19am UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714/4 "2024-05-08T01:19:43Z")

</div>

Thanks for the helpful tip! Ran into the same problem, and FYI dd-trace v5.12.0 resolves the issue for us.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 22, 2024, 1:20am UTC](https://community.auth0.com/t/node-sdk-management-client-fetcherror-the-request-failed-and-the-interceptors-did-not-return-an-alternative-response/132714/5 "2024-05-22T01:20:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
