Skip to content

Commit

Permalink
chore: log email on error (#7863)
Browse files Browse the repository at this point in the history
* chore: log email on error

* fix: remove answer print
  • Loading branch information
kevin9foong authored Nov 7, 2024
1 parent 92cf43e commit a8ece36
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/utils/field-validation/validators/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const makeSignatureValidator: (
const { signature, answer } = response
if (!signature) {
return left(
`CommonValidator.makeSignatureValidator:\t answer does not have valid signature`,
`CommonValidator.makeSignatureValidator:\t answer signature is missing`,
)
}
const isSigned =
Expand Down Expand Up @@ -102,8 +102,9 @@ export const makeSignatureValidatorV3 =
}
const { value, signature } = response.answer
if (!signature) {
// TODO: (FM-1688) Remove this log after sure that validation logic works as expected.
return left(
`CommonValidatorV3.makeSignatureValidator:\t answer does not have valid signature`,
`CommonValidatorV3.makeSignatureValidator:\t answer signature is missing. value: ${value}, signature: ${signature}`,
)
}
const isSigned =
Expand All @@ -117,7 +118,8 @@ export const makeSignatureValidatorV3 =

return isSigned
? right(response)
: left(
`CommonValidatorV3.makeSignatureValidator:\t answer does not have valid signature`,
: // TODO: (FM-1688) Remove this log after sure that validation logic works as expected.
left(
`CommonValidatorV3.makeSignatureValidator:\t answer does not have valid signature. value: ${value}, signature: ${signature}`,
)
}

0 comments on commit a8ece36

Please sign in to comment.