Bug fixes

This commit is contained in:
Juan Gilsanz Polo 2023-11-24 20:44:56 +01:00
parent 002fca4e3f
commit 8dc9539a3a
4 changed files with 52 additions and 26 deletions

View file

@ -698,9 +698,18 @@ class ApiClientV2 {
try {
return ApiResponse(
successful: result.successful,
content: result.body != null
? EncyptionValidation.fromJson(jsonDecode(result.body!))
: null
content: result.body != null ? EncryptionValidationResult(
isObject: false,
encryptionValidation: EncryptionValidation.fromJson(jsonDecode(result.body!))
) : null
);
} on FormatException {
return ApiResponse(
successful: result.successful,
content: result.body != null ? EncryptionValidationResult(
isObject: false,
message: result.body
) : null
);
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);