Show StoreKit errors as custom alert

Hi,

I am planning to show the StoreKitError as alerts, I have corresponding custom Error so that I can show meaningful error messages.

Reason

  • I wanted to display error alert messages that describe the underlying error so that when in production and user faces this error I would be able to reason about the error and try to resolve the error in a app update or Appstore Connect change.
  • If I display a generic error I wouldn't know the cause of the error, but is there is a security risk in display the following kind of messages?

Proposed UI error messages:

| Error                                | UI alert message                                |
| ------------------------------------ | ----------------------------------------------- |
| StoreKitError.notEntitled            | App is not entitled to make this request.       |
| PurchaseError.invalidOfferSignature  | Invalid offer signature.                        |

Questions

  1. From a security / user perspective is it risky / wrong to show an error message like the ones pasted above?
  2. Or are there some errors I shouldn't explicitly state?
  3. Or is there a better / preferred approach?
Show StoreKit errors as custom alert
 
 
Q