Skip to content

Commit

Permalink
Add extra error check
Browse files Browse the repository at this point in the history
  • Loading branch information
taurgis committed Oct 14, 2024
1 parent 76d5e7e commit 4f9aaaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scripts/getRoombaCredentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ function loginToIRobot(body) {
});

res.on('end', () => {
loginIrobotResponseHandler(null, res, JSON.parse(data));
try {
loginIrobotResponseHandler(null, res, JSON.parse(data));
} catch (e) {
loginIrobotResponseHandler(e);
}
});
});

Expand Down

0 comments on commit 4f9aaaf

Please sign in to comment.