better logs
This commit is contained in:
parent
a214a4cd56
commit
e2c1c8fa0b
1 changed files with 5 additions and 3 deletions
|
|
@ -34,15 +34,17 @@ const onAcceptedRequests = (user, SEA) => {
|
||||||
.map()
|
.map()
|
||||||
.once(async (storedReq, id) => {
|
.once(async (storedReq, id) => {
|
||||||
logger.info(
|
logger.info(
|
||||||
`------------------------------------\nPROCID:${procid}\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)) {
|
||||||
throw new TypeError(
|
logger.warn(
|
||||||
'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)'
|
||||||
)
|
)
|
||||||
|
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