Reserved topic stuff
This commit is contained in:
@@ -231,6 +231,8 @@ class AccountApi {
|
||||
});
|
||||
if (response.status === 401 || response.status === 403) {
|
||||
throw new UnauthorizedError();
|
||||
} else if (response.status === 409) {
|
||||
throw new TopicReservedError();
|
||||
} else if (response.status !== 200) {
|
||||
throw new Error(`Unexpected server response ${response.status}`);
|
||||
}
|
||||
@@ -312,6 +314,13 @@ export class UsernameTakenError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
export class TopicReservedError extends Error {
|
||||
constructor(topic) {
|
||||
super("Topic already reserved");
|
||||
this.topic = topic;
|
||||
}
|
||||
}
|
||||
|
||||
export class AccountCreateLimitReachedError extends Error {
|
||||
constructor() {
|
||||
super("Account creation limit reached");
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
const config = window.config;
|
||||
|
||||
if (config.base_url === "") {
|
||||
config.base_url = window.location.origin;
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user