throw instead of log
This commit is contained in:
parent
788e871392
commit
d12656d154
1 changed files with 3 additions and 2 deletions
|
|
@ -40,15 +40,16 @@ const onAcceptedRequests = (user, SEA) => {
|
||||||
logger.info(
|
logger.info(
|
||||||
`------------------------------------\nPROCID:${procid} (used for debugging memory leaks in jobs)\n---------------------------------------`
|
`------------------------------------\nPROCID:${procid} (used for debugging memory leaks in jobs)\n---------------------------------------`
|
||||||
)
|
)
|
||||||
|
|
||||||
const mySecret = require('../../Mediator').getMySecret()
|
const mySecret = require('../../Mediator').getMySecret()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!Schema.isStoredRequest(storedReq)) {
|
if (!Schema.isStoredRequest(storedReq)) {
|
||||||
logger.warn(
|
throw new Error(
|
||||||
'Stored request not an StoredRequest, instead got: ' +
|
'Stored request not an StoredRequest, instead got: ' +
|
||||||
JSON.stringify(storedReq) +
|
JSON.stringify(storedReq) +
|
||||||
' this can be due to nulling out an old request (if null) or something else happened (please look at the output)'
|
' this can be due to nulling out an old request (if null) or something else happened (please look at the output)'
|
||||||
)
|
)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
const recipientPub = await SEA.decrypt(storedReq.recipientPub, mySecret)
|
const recipientPub = await SEA.decrypt(storedReq.recipientPub, mySecret)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue