Skip to content

checkoutWithRequest:fromViewController:completion: should use NSError default keys to provide concise error info #11

@alvaromb

Description

@alvaromb

As per https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/index.html#//apple_ref/occ/cl/NSError, NSError has a default way to handle application errors with localized description keys. However, when performing a checkout with checkoutWithRequest:fromViewController:completion: that causes an error, localizedFailureReason, localizedRecoverySuggestion and localizedRecoveryOptions return nil.

Inside the error's userInfo there is useful information, this is the console output of a po [error userInfo] lldb command.

screen shot 2016-04-04 at 12 14 42

It's a bit tricky to access to the message key, which contains relevant localized information about the error.

screen shot 2016-04-04 at 12 17 32

Populating the localized keys with the info of the underlying error would be very helpful.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions