Skip to content

Improve logging of the PreApprovalElement decoding#228

Merged
Hopsaheysa merged 1 commit intodevelopfrom
issues/227-elements-log
Nov 6, 2025
Merged

Improve logging of the PreApprovalElement decoding#228
Hopsaheysa merged 1 commit intodevelopfrom
issues/227-elements-log

Conversation

@Hopsaheysa
Copy link
Member

@Hopsaheysa Hopsaheysa requested a review from Copilot November 6, 2025 11:16
@Hopsaheysa Hopsaheysa changed the title Improve logging for PreApprovalElement Improve logging of the PreApprovalElement decoding Nov 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves error logging for JSON deserialization failures in operation UI data parsing and adds test coverage for malformed JSON structures.

  • Enhanced error visibility by upgrading log levels from warning/debug to error for JSON deserialization failures
  • Added test coverage for incorrect JSON structure handling (object instead of array for elements)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
library/src/main/java/com/wultra/android/mtokensdk/api/operation/utils/JsonHelpers.kt Upgraded log levels from w/d to e for type mismatches and deserialization failures, and improved null handling with early returns
library/src/androidTest/java/OperationUIDataTests.kt Added test case for Screen3 with incorrect elements structure to verify graceful error handling and null fallback behavior

@Hopsaheysa Hopsaheysa requested a review from kober32 November 6, 2025 11:43
@Hopsaheysa Hopsaheysa merged commit 88971c0 into develop Nov 6, 2025
10 checks passed
@Hopsaheysa Hopsaheysa deleted the issues/227-elements-log branch November 6, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants