diff --git a/frontend/src/views/Verify.vue b/frontend/src/views/Verify.vue
index 533a911..b56cd1c 100644
--- a/frontend/src/views/Verify.vue
+++ b/frontend/src/views/Verify.vue
@@ -11,11 +11,11 @@
-
@@ -163,6 +163,8 @@ export default {
getPlainCredential(credential) {
var clean_credential = {...credential};
delete clean_credential.verified;
+ delete clean_credential.revoked;
+ delete clean_credential.error;
return clean_credential
},
downloadCredential(credential) {
@@ -214,13 +216,43 @@ export default {
const res = await this.$api.post('/vc', [credential]);
- const verified = res.data[0].verified
+ const result = res.data[0];
+
+ var credentialResult = {verified: result.verified};
+
+ if (!result.verified) {
+
+ var message;
+
+ if (result.statusResult && !result.statusResult.verified) {
+
+ credentialResult.revoked = true;
+
+ message = 'Credential is revoked!';
+
+ }
+
+ if (result.error) {
+
+ message = result.error.name + '\n';
+
+ if (result.error.errors) result.error.errors.forEach( (e) => {
+
+ message += e.name + ' ' + e.message + '\n';
+
+ })
+
+ credentialResult.error = message;
+
+ }
+
+ this.toast.warning(`Verification of ${credential.type[1]} failed!\nCause: ${message}`);
- if (!verified) this.toast.warning(`Verification of ${credential.type[1]} failed!`);
+ }
this.progress += 1
- return Object.assign(credential, {verified: verified});
+ return Object.assign(credential, credentialResult);
}.bind(this)));