Skip to content

Commit

Permalink
Harden queryServerVerification
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-markl committed Aug 4, 2023
1 parent e8d46b0 commit 191bd62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ Future<CardVerificationByHash$Query$CardVerificationResultModel> _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);
Expand Down

0 comments on commit 191bd62

Please sign in to comment.