Skip to content
Snippets Groups Projects
Commit b988445f authored by syuilo's avatar syuilo
Browse files

[Server] Improve: Better error handling

parent 4e9bb87d
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,9 @@ module.exports = (req: express.Request, res: express.Response) => {
request(url, (err, response, xml) => {
if (err) {
console.error(err);
return;
res.sendStatus(500);
} else {
res.send(xml2json.toJson(xml));
}
res.send(xml2json.toJson(xml));
});
};
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