Skip to content

Commit

Permalink
add improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroxbt committed Aug 4, 2022
1 parent 28c1b03 commit 954a114
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class HandleStoreRequestCommand extends HandleProtocolMessageCommand {
await this.operationIdService.getCachedOperationIdData(operationId);

if (storeInitAssertionId !== assertionId) {
throw Error('Store request assertion id does not match store init assertion id');
throw Error(
`Store request assertion id ${assertionId} does not match store init assertion id ${storeInitAssertionId}`,
);
}

await this.operationIdService.updateOperationIdStatus(
Expand Down
8 changes: 3 additions & 5 deletions src/service/get-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,12 @@ class GetService extends OperationService {

this.logger.debug(
`Assertion: ${assertionGraphName} for operationId: ${operationId} ${
nquads ? '' : 'not'
nquads.length ? '' : 'not'
} found in local database.`,
);

if (nquads) {
this.logger.debug(
`Number of n-quads retrieved from the database : ${nquads.length ?? 0}`,
);
if (nquads.length) {
this.logger.debug(`Number of n-quads retrieved from the database : ${nquads.length}`);
}

return nquads;
Expand Down

0 comments on commit 954a114

Please sign in to comment.