Skip to content

Commit

Permalink
More error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
seneye committed Feb 8, 2017
1 parent ffb03f1 commit eb8d2cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NodeJs/server/server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion NodeJs/server/server.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions NodeJs/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ http.createServer(function (req, res) {
}
let currSource = KnownSources.find(o=>o.source == req.headers["x-seneye"]);
if (!currSource) {
console.info('->> !! Request from a unknown device ' + req.headers["x-seneye"].red);
res.writeHead(404);
res.end();
return;
Expand Down Expand Up @@ -69,6 +70,10 @@ http.createServer(function (req, res) {
var d = JSON.parse(buf.toString());
AddNewData(d.SUD);
}
else
{
console.info('->> !! Check the secret for ' + req.headers["x-seneye"].red + ': signature do not match');
}
}
}
if (isValid) {
Expand Down

0 comments on commit eb8d2cf

Please sign in to comment.