Skip to content
Snippets Groups Projects
Commit 68f52aa1 authored by Klaus Klein's avatar Klaus Klein
Browse files

Remove error from http response

parent e7e1243f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
});
})
......
......@@ -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) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment