Failed to load resource: the server responded with a status of 422

Some of my users get a generic “There is an error” message when they try to join new channels.

As that happens, an error in console is reported:

Failed to load resource: the server responded with a status of 422

Which refers to this URL https://domain.com/chat/chat_channels/ID/follow.json where ID is the chat ID.

That “.json” file contains:

{
    "errors": [
        "Slug is invalid"
    ],
    "error_type": "record_invalid"
}

My best guess is that it has to do with the fact that the chat name contains Cyrillic characters. When I try to rename that channel to have an English name, it gives the error “the slug is invalid” and doesn’t allow me to change it into anything. The chat has a URL https://domain.com/chat/channel/ID/-ID

1 Like

I ran into a similar problem just now. When I try to create a channel, it tells me that Slug is invalid, no matter what slug I use.
Also, I’m guessing it’s because the channels I’ve used contain non-latin letters. This is the problem when I delete one of my such channels.

I will improve the error message, but for now you can probably fix this by changing this SiteSetting: slug_generation_method

Using encoded should work.

2 Likes

I’ve noticed that Chat became a core plugin, so I removed it from app app.yml and rebuilt discourse. The issue seems to be fixed now

4 Likes