Skip to content

Improve error handling for encoding operations in push activation flow #2174

@coderabbitai

Description

@coderabbitai

Description

Currently, encoding operations in the push activation state machine silently ignore errors by passing nil for the error parameter. Specifically, in Source/ARTPushActivationStateMachine.m, the call to encodeLocalDevice:error: passes nil, which means encoding failures are not detected or reported to the state machine.

This could lead to malformed requests being sent if encoding fails, without any error being logged or reported to the user.

Location

File: Source/ARTPushActivationStateMachine.m (around lines 193-205 in the current version)

Backlinks

Recommendation

Capture and handle encoding errors appropriately by:

  1. Passing a valid error pointer to encoding operations
  2. Checking for encoding failures
  3. Logging errors and emitting appropriate failure events when encoding fails

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions