This diff introduces changes to the A2 (APNs) library wrapper and `apns_status` shared `enum`.
To distinguish common errors and wrong/expired device token errors the function should return different results.
Following a current keyserver's approach we should check for the following errors:
- We should not check for HTTP status code other than 200 for success, it's already done [[ https://github.com/WalletConnect/a2/blob/8abd89b36e1f81692064f65d0f0f82e2f878d72e/src/client.rs#L115 | inside the A2 library ]].
- We should check for `ErrorReason` of [[ https://github.com/WalletConnect/a2/blob/8abd89b36e1f81692064f65d0f0f82e2f878d72e/src/response.rs#L117) | Unregistered ]] which is similar to the keyserver's [[ https://github.com/CommE2E/comm/blob/088c3d06da341b88a1ed9f0ae925f67c6526211b/keyserver/src/push/utils.js#L24 | apnTokenInvalidationErrorCode ]].
- We should check for `ErrorReason` of [[ https://github.com/WalletConnect/a2/blob/8abd89b36e1f81692064f65d0f0f82e2f878d72e/src/response.rs#L52 | BadDeviceToken ]] which is similar to the keyserver's [[ https://github.com/CommE2E/comm/blob/088c3d06da341b88a1ed9f0ae925f67c6526211b/keyserver/src/push/utils.js#L26 | apnBadTokenErrorString ]].
To pass the different errors to the C++ level the best and most elegant way is to return `enum` as `Ok` Rust result which formats like:
```
enum apns_status {
Ok,
Unregistered,
BadDeviceToken,
}
```
and use CXX shared types.
Because when can't distinguish error types from Rust on the C++ side, they are always `rust::error` type and have only `what()` method.
Also, we will catch the common errors which are not needed to be distinguished using the `catch` approach.
Related Linear task: [[ https://linear.app/comm/issue/ENG-1764/distinguish-common-and-wrongexpired-device-token-errors-in-rust | ENG-1764 ]]