class Object
Constants
- ACCEPT
- ERRORS_BY_ERROR_CODE
- ERRORS_BY_STATUS
- PATHNAME_COMPANY
- PATHNAME_CONTACT
- TIMEOUT
- URL
- VERSION
Public Instance Methods
exception_for_response(status, errorCode)
click to toggle source
# File lib/common.rb, line 19 def exception_for_response(status, errorCode) fast_track_error = nil if errorCode != nil fast_track_error = ERRORS_BY_ERROR_CODE[errorCode] end if fast_track_error == nil && status != nil fast_track_error = ERRORS_BY_STATUS[status.to_s] if status >= 500 && status < 600 fast_track_error = FastTrack::InternalServerException end end if fast_track_error == nil fast_track_error = Exception end return fast_track_error end