add auto-fading error notifications to the UI
[browser-rts.git] / src / lib / server.ts
index e27981298d64701ae4a7fcff617c09fede624595..6615487bf31666301eba38268671f82e7af56e11 100644 (file)
@@ -6,6 +6,7 @@ import bodyParser from 'body-parser';
 import { ExpressAdapter } from '@bull-board/express';
 import http from 'http';
 import { Server } from 'socket.io';
+import {HttpError} from '../errors';
 
 type AuthInfo = {
        authInfo: { 
@@ -83,9 +84,8 @@ export class HttpServer {
                        }
                        catch(e) {
                                console.log(e);
-                               //res.statusCode = (e as HttpError).statusCode || 500;
                                res.send(`
-                               <div class="alert danger">${e.message}</div>
+                               <div class="alert danger autofade">${e.message}</div>
                                `);
                        }
                        finally {