Skip to content

Commit

Permalink
change error message to match VC-API spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jchartrand committed Dec 3, 2024
1 parent 29f6c09 commit d7601ef
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,11 @@ export async function build() {
)
}
const verificationResult = await verifyCredential(vc)
console.log('verificationResult in app.js /credentials/verify:')
console.log(JSON.stringify(verificationResult))

if (verificationResult.verified) {
return res.json(verificationResult)
} else {
throw new VerificationException(
400,
'A verifiableCredential property must be provided in the body and it must contain a verifiable credential.'
)
throw new VerificationException(400, 'invalid input!')
}
} catch (e) {
// catch the async errors and pass them to the error logger and handler
Expand Down

0 comments on commit d7601ef

Please sign in to comment.