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.
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::SOAPFaultrelated toExceededConcurrentRequestLimitFaultshould trigger something likeNetSuite::RequestLimitErrorextendingNetSuite::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 rescueNetSuite::Error. Same thing for any network condition error that might occur at any time, it'd be nice to have aNetSuite::NetworkErrorcover those details.