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.
In Review
π Bugs
6 months ago
Tanguy GΓ©rΓ΄me
Get notified by email when there are changes.
In Review
π Bugs
6 months ago
Tanguy GΓ©rΓ΄me
Get notified by email when there are changes.