"Already invited to channel" error doesn't get triggered consistently?

I’m seeing the following error pop up.

{“message”:“Already invited to the channel”,“code”:400000,“error”:true}

This seems like if a user is already in a channel, then the error would be returned. But when I test locally, I can invite a user many times to the same channel and get a 200 response.

We are inviting one or more users who may or may not already be members to a group channel (or some combo of both). I’d like to catch this error since it’s expected.

Also the 40000 code is a generic error code, right? So I shouldn’t expect it to uniquely identify this case?


Hi @jenny,

Are you expecting that if 1 of the users invited in the call is already included, that an error should be thrown, or only if all of the users who are included in the call are already invited?

I would only expect the error to trigger if all of the users included in the call are already invited, but I am not able to reproduce the error in that case.

Can you confirm in what case this error gets triggered?

Ping on this @Tyler, we are still hitting this error and I’m not sure the best way to handle.

Hi @jenny,

Sorry for the delay. I dropped the ball on this issue and it slipped off my radar. Have you been able to easily produce this issue at all? If so, what steps are you using?

No, I’m not able to reproduce this error, I only see it in production. Can you figure out what is triggering?

Also will this error always keep the 40000 code? I assume that is a generic code and shouldn’t be used to uniquely identify this case.