# Sometimes failed to invoke Delete a User API

**URL:** <https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526>\
**Category:** Get Help\
**Tags:** api\
**Created:** [April 11, 2022, 4:47am UTC](https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526 "2022-04-11T04:47:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobayashi\_t](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kobayashi_t/32/34533_2.png) [@kobayashi\_t](https://community.auth0.com/u/kobayashi_t)\
**Post date:** [April 11, 2022, 4:47am UTC](https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526/1 "2022-04-11T04:47:26Z")

</div>

We detected error in case of invoking Delete a user API.  
Phenomenon is as follow.

- First date to detect this error : 0:15 JST Apr 6th in 2022
- Frequency of occurrence : about 2 of 200 API calls ( about 1% )
- Client library verision : node-auth0 2.36.1
- Latest date to detect this error : 2022-04-11T11:49:11 JST
- Stacktrace in case of failure detection is as follow.  
(Our credentials are masked as ‘XXX’)

```auto
[message] read ECONNRESET
[stack] APIError: read ECONNRESET\n at /XXX/node_modules/rest-facade/src/Client.js:387:27\n at Request.callback (/XXX/node_modules/superagent/lib/node/index.js:905:3)\n at ClientRequest.<anonymous> (/XXX/node_modules/superagent/lib/node/index.js:822:12)\n at ClientRequest.emit (events.js:400:28)\n at TLSSocket.socketErrorListener (_http_client.js:475:9)\n at TLSSocket.emit (events.js:400:28)\n at emitErrorNT (internal/streams/destroy.js:106:8)\n at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)

```

 https://auth0.com/docs/api/management/v2#!/Users/delete\_users\_by\_id

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 11, 2022, 11:09pm UTC](https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526/3 "2022-04-11T23:09:10Z")

</div>

Hi @kobayashi_t,

This is a connection error. Is it possible the connection is getting hung up for some reason? Usually a network issue? Do you see anything in your Auth0 tenant logs?

Also, you may want to upgrade to the most recent version.

---

<div class="post-metadata">

**Author:** ![kobayashi\_t](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kobayashi_t/32/34533_2.png) [@kobayashi\_t](https://community.auth0.com/u/kobayashi_t)\
**Post date:** [April 13, 2022, 6:39am UTC](https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526/4 "2022-04-13T06:39:38Z")

</div>

Hi @dan.woda  
Thank you for your reply.  
We’ll try to do your recommendation(upgrade) as a solution.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 13, 2022, 6:26pm UTC](https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526/5 "2022-04-13T18:26:59Z")

</div>

Sounds good. Let me know how it goes!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 25, 2022, 9:30pm UTC](https://community.auth0.com/t/sometimes-failed-to-invoke-delete-a-user-api/81526/6 "2022-05-25T21:30:33Z")

</div>


