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

Missing properties in ARTErrorInfo #1261

Closed
ikbalkaya opened this issue Jan 4, 2022 · 4 comments · Fixed by #1304
Closed

Missing properties in ARTErrorInfo #1261

ikbalkaya opened this issue Jan 4, 2022 · 4 comments · Fixed by #1304
Assignees
Labels
enhancement New feature or improved functionality.

Comments

@ikbalkaya
Copy link
Contributor

ikbalkaya commented Jan 4, 2022

Captured in following Flutter issue
ably/ably-flutter#14

Following properties are missing from ARTErrorInfo class

  • code
  • cause

Please see linked issue for details of each property

┆Issue is synchronized with this Jira Story by Unito

@maratal
Copy link
Collaborator

maratal commented Feb 20, 2022

@QuintinWillison
Copy link
Contributor

From TI1 and the IDL, we can see that cause is an optional ErrorInfo instance. The reason property on ARTErrorInfo is a string, so not the same thing.

Therefore, perhaps, cause is more aligned with one, other or both of:

Perhaps one of the corners of Apple's APIs that could best be described as a bit of a 'hot mess' (not unlike our own ErrorInfo 'concept', but I digress 🙄)... so, I think to fix this issue:

  1. We need to add a cause issue to ARTErrorInfo, of type ARTErrorInfo
  2. Work out an appropriate algorithm for populating it... do we have any existing examples of where it might have revealed something interesting that we can model on?

@maratal
Copy link
Collaborator

maratal commented Feb 28, 2022

...and the IDL, we can see that cause is an optional ErrorInfo instance.

You are right, my bad.

@maratal
Copy link
Collaborator

maratal commented Mar 6, 2022

Work out an appropriate algorithm for populating it...

From the docs to NSUnderlyingErrorKey:

The corresponding value is an error that was encountered in an underlying implementation and caused the error that the receiver represents to occur.

Seems like the NSUnderlyingErrorKey is a perfect match for cause property.

@QuintinWillison QuintinWillison added the enhancement New feature or improved functionality. label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

Successfully merging a pull request may close this issue.

3 participants