Skip to content

iOS error handling oddities #6

@EddyVerbruggen

Description

@EddyVerbruggen

Hi!

Thanks for your great work on this plugin 👍👍👍

Strange things I noticed (and will send a PR for) when testing error flows on iOS. For instance when an error 500 is returned (tested with https://httpbin.org/status/500).

  1. This plugin swallows the parse exception on both iOS and Android and resolves the promise, but the built-in NativeScript http plugin rejects the promise in case of parse exceptions. I'm not saying one is better than the other, but the difference bit me while trying to use this as a drop-in replacement. Would you accept a PR that rejects the promise like the http module does? I take no for an answer it's your plugin and changing this behavior my be problematic for existing users ;)
  2. When a failure occurs on iOS the plugin assumes it's a pinning failure in case pinning was enabled. In case of a 500 for instance it's simply an error on the server, while the certificate is fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions