Improving error throwing and handling in pusher/admin/front

This commit is contained in:
David Négrier 2021-03-31 15:48:25 +02:00
parent 9bfd07f00c
commit cd7a332b4c
4 changed files with 21 additions and 9 deletions

View file

@ -24,7 +24,7 @@ class AdminApi {
async fetchMapDetails(organizationSlug: string, worldSlug: string, roomSlug: string|undefined): Promise<AdminApiData> {
if (!ADMIN_API_URL) {
return Promise.reject('No admin backoffice set!');
return Promise.reject(new Error('No admin backoffice set!'));
}
const params: { organizationSlug: string, worldSlug: string, roomSlug?: string } = {