From 68f52aa107ab11ebfa537007a811c2a10bc028e4 Mon Sep 17 00:00:00 2001 From: Klaus Klein Date: Thu, 8 Jun 2017 14:29:35 -0300 Subject: [PATCH] Remove error from http response --- bigbluebutton-html5/imports/startup/client/intl.jsx | 5 ++++- bigbluebutton-html5/imports/startup/server/index.js | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-html5/imports/startup/client/intl.jsx b/bigbluebutton-html5/imports/startup/client/intl.jsx index 298ecd91f7..822d054a9a 100755 --- a/bigbluebutton-html5/imports/startup/client/intl.jsx +++ b/bigbluebutton-html5/imports/startup/client/intl.jsx @@ -51,7 +51,10 @@ class IntlStartup extends Component { return response.json(); }) .then((messages) => { - this.setState({ messages }, () => { + if (messages.statusCode === 506) { + this.setState({ appLocale: 'en' }); + } + this.setState({ messages: messages.messages }, () => { baseControls.updateLoadingState(false); }); }) diff --git a/bigbluebutton-html5/imports/startup/server/index.js b/bigbluebutton-html5/imports/startup/server/index.js index a3eb5c198f..869fffc72a 100755 --- a/bigbluebutton-html5/imports/startup/server/index.js +++ b/bigbluebutton-html5/imports/startup/server/index.js @@ -43,8 +43,7 @@ WebApp.connectHandlers.use('/locale', (req, res) => { }); res.setHeader('Content-Type', 'application/json'); - res.writeHead(statusCode); - res.end(JSON.stringify(messages)); + res.end(JSON.stringify({ statusCode, messages })); }); WebApp.connectHandlers.use('/locales', (req, res) => {