Skip to content

Savon::Error and Excon::Error exceptions should not escape the library. #562

Description

@sberlan-odeko

There are several classes of errors that can happen anywhere and any time, such as the myriad of SOAP faults from NetSuite, or even just the underlying HTTP requests that are exposed as exceptions from the underlying libraries used by this gem. Savon and Excon errors should be wrapped with error classes which would make it easier for developers to sort out where the exception came from and reduce the need to understand what kinds of faults might come from the SuiteTalk api might randomly show up.

Example. A Savon::SOAPFault related to ExceededConcurrentRequestLimitFault should trigger something like NetSuite::RequestLimitError extending NetSuite::Error, so that if someone wants to retry a netsuite action, they don't have to go through the song and dance of determining exactly what fault occurred, or if they just want to retry on any netsuite related error, just rescue NetSuite::Error. Same thing for any network condition error that might occur at any time, it'd be nice to have a NetSuite::NetworkError cover those details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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