From 191bd62764232844e2a075c02c3701360523d18f Mon Sep 17 00:00:00 2001 From: Michael Markl Date: Fri, 4 Aug 2023 11:24:35 +0200 Subject: [PATCH] Harden queryServerVerification --- .../verification_workflow/query_server_verification.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/lib/identification/verification_workflow/query_server_verification.dart b/frontend/lib/identification/verification_workflow/query_server_verification.dart index 849fe06ca..19eba4218 100644 --- a/frontend/lib/identification/verification_workflow/query_server_verification.dart +++ b/frontend/lib/identification/verification_workflow/query_server_verification.dart @@ -59,13 +59,13 @@ Future _queryServerVer try { final queryResult = await client.query(queryOptions); final exception = queryResult.exception; - if (exception != null && queryResult.hasException) { + if (exception != null) { throw exception; } final data = queryResult.data; if (data == null) { - return CardVerificationByHash$Query$CardVerificationResultModel(); + throw ServerVerificationException("Returned data is null."); } final parsedResult = byCardDetailsHash.parse(data);