Skip to content

Commit

Permalink
✨ Cambios en e2e - redirección a main
Browse files Browse the repository at this point in the history
  • Loading branch information
coral2742 committed May 8, 2024
1 parent ad64fff commit 8bfa56e
Show file tree
Hide file tree
Showing 6 changed files with 1,567 additions and 51 deletions.
6 changes: 5 additions & 1 deletion gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ app.get('/createquestion', async (req, res) => {
// Return a json response with what we obtained on the petition
res.json(questionResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
if (error.response) {
res.status(error.response.status).json({ error: error.response.data.error });
} else {
res.status(500).json({ error: 'Internal Server Error' });
}
}
});

Expand Down
Loading

0 comments on commit 8bfa56e

Please sign in to comment.