Skip to content

Commit

Permalink
More debugging capabilities on MDL demo
Browse files Browse the repository at this point in the history
  • Loading branch information
cykoder committed Sep 12, 2024
1 parent 1f67923 commit af0422e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pages/mdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,14 @@ function OID4VPProofRequest({ title, desc, proofRequestSetupObject, onPres, setE
const dataObj = JSON.parse(responseForServer.data);
if (dataObj.vp_token) {
// we must act as the client submitting the presentation now
await axios.post(`${baseUrl}/openid/vp/${proofRequest.id}/callback`, dataObj);
try {
await axios.post(`${baseUrl}/openid/vp/${proofRequest.id}/callback`, dataObj);
} catch (e) {
console.error(e);
throw new Error(
`Likely failed to verify or invalid data: ${JSON.stringify(dataObj, null, 2)}`
);
}
} else {
throw new Error('Cannot find vp_token in creds api response');
}
Expand Down

0 comments on commit af0422e

Please sign in to comment.