backtrace-service
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -140,3 +140,3 @@ "use strict"; | ||
status: 'error', | ||
error: 'internal error', | ||
error: 'missing parameters', | ||
}); | ||
@@ -165,2 +165,6 @@ return; | ||
if (!_this.checkHmac(opts.secret, coronerd_nonce, coronerd_hmac)) { | ||
response.status(403).send({ | ||
status: 'error', | ||
error: 'missing parameters', | ||
}); | ||
next(new Error('Invalid server generated HMAC')); | ||
@@ -174,4 +178,6 @@ return; | ||
if (!bodyj.user) { | ||
// Will - could you please give me error schema? | ||
// const error = bodyj.error ? bodyj.error : new Error('auth failure'); | ||
response.status(403).send({ | ||
status: 'error', | ||
error: 'missing parameters', | ||
}); | ||
next(new Error('auth failure')); | ||
@@ -184,2 +190,6 @@ } | ||
.catch(function (err) { | ||
response.status(403).send({ | ||
status: 'error', | ||
error: 'Cannot retrieve information from server', | ||
}); | ||
next(err); | ||
@@ -186,0 +196,0 @@ }); |
{ | ||
"name": "backtrace-service", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Common tools for Backtrace Node services", | ||
@@ -5,0 +5,0 @@ "author": "Backtrace", |
@@ -117,3 +117,3 @@ import axios, { AxiosResponse } from 'axios'; | ||
status: 'error', | ||
error: 'internal error', | ||
error: 'missing parameters', | ||
}); | ||
@@ -144,2 +144,6 @@ return; | ||
if (!this.checkHmac(opts.secret, coronerd_nonce, coronerd_hmac)) { | ||
response.status(403).send({ | ||
status: 'error', | ||
error: 'missing parameters', | ||
}); | ||
next(new Error('Invalid server generated HMAC')); | ||
@@ -154,4 +158,6 @@ return; | ||
if (!bodyj.user) { | ||
// Will - could you please give me error schema? | ||
// const error = bodyj.error ? bodyj.error : new Error('auth failure'); | ||
response.status(403).send({ | ||
status: 'error', | ||
error: 'missing parameters', | ||
}); | ||
next(new Error('auth failure')); | ||
@@ -163,2 +169,7 @@ } else { | ||
.catch((err) => { | ||
response.status(403).send({ | ||
status: 'error', | ||
error: 'Cannot retrieve information from server', | ||
}); | ||
next(err); | ||
@@ -165,0 +176,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59222
1064