Addresses rmloeb feedback

This commit is contained in:
Pete ba
2019-05-19 09:12:02 +01:00
parent 61f2606323
commit 5d8ab45244
2 changed files with 4 additions and 3 deletions

View File

@@ -242,8 +242,9 @@ export const getWateringData = async function( req: express.Request, res: expres
adjustmentOptions = JSON.parse( "{" + adjustmentOptionsString + "}" );
} catch ( err ) {
// If the JSON is not valid, do not incorporate weather adjustment options
adjustmentOptions = undefined;
// If the JSON is not valid then abort the claculation
res.send(`Error: Unable to parse options (${err})`);
return;
}
// Attempt to resolve provided location to GPS coordinates.