added usage of json error responses in the invite lobby