This diff adds client-side error handling for preventing a user from trying to create a role with a name that already exists in the community. This is already handled on the keyserver and on the database with a unique key, but ideally we prevent the client from reaching a bad state in the first place. I confirmed with ted that the designs for this are fine
Depends on D8596
Let's avoid passing constants as number literals like this. Instead, please define something like eg. threadTypes, so that this code is more "readable" at the callsite (eg. we would see something like olmMessageTypes.TEXT or something)