Deleting a user through the Console API fails with 500 error code


const hyvorUsers = await axios.get(
  `https://talk.hyvor.com/api/console/v1/xxxx/users?search=${user.email}`,
  {
    headers: {
      'X-API-KEY': HYVOR_CONSOLE_API_KEY
    }
  }
)
if (hyvorUsers?.data?.length === 1) {
  await axios.delete(
    `https://talk.hyvor.com/api/console/v1/xxxx/user/${(hyvorUsers.data as any)[0].htid}`,
    {
      headers: {
        'X-API-KEY': HYVOR_CONSOLE_API_KEY
      }
    }
  )
}


The above is an example typescript code that fails (with website id removed). Even if the first API call succeeds, and I get a correct Hyvor user as a result, the second call then fails and give me a 500 error code.

If I try the DELETE call with a random false htid, it does correctly give me a 404 error code

Please authenticate to join the conversation.

Sign in / Sign up β†’

Upvoters
Status

In Review

Board

🐞 Bugs

Date

27 days ago

Author

Tanguy GΓ©rΓ΄me

Subscribe to post

Get notified by email when there are changes.