Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error logging in OrderDetailsDataSource #14018

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

pmusolino
Copy link
Member

Part of #13853

Description

This update enhances the error logging within the OrderDetailsDataSource class to improve crash diagnostics. The changes ensure that invalid indices and sections are logged for better debugging and error tracking.

Summary of changes

  • Add crash logging for invalid shippingLabelIndex.
  • Add crash logging for invalid row index for shippingLabel.
  • Add crash logging for invalid section in numberOfRowsInSection.
  • Add crash logging for invalid section and row in cellForRowAtIndexPath.
  • Add crash logging for invalid section in viewForHeaderInSection.
  • Update RELEASE-NOTES.txt to reflect the new changes and enhancements.

Steps to reproduce

  • Verify that the application logs appropriate error messages when invalid indices or sections are encountered in the OrderDetailsDataSource class. However, this could be complicated, as we have rarely if ever been able to replicate this crash.

Testing information

Please, smoke testing the Order Detail section to make sure everything works like before.


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

- Add crash logging for invalid shippingLabelIndex in OrderDetailsDataSource.swift
- Add crash logging for invalid row index for shippingLabel in OrderDetailsDataSource.swift
- Add crash logging for invalid section in numberOfRowsInSection in OrderDetailsDataSource.swift
- Add crash logging for invalid section and row in cellForRowAtIndexPath in OrderDetailsDataSource.swift
- Add crash logging for invalid section in viewForHeaderInSection in OrderDetailsDataSource.swift
@pmusolino pmusolino added this to the 20.6 milestone Sep 23, 2024
@wpmobilebot
Copy link
Collaborator

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14018-b5fe5ea
Version20.5
Bundle IDcom.automattic.alpha.woocommerce
Commitb5fe5ea
App Center BuildWooCommerce - Prototype Builds #10952
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: order details Related to order details.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants