Check if status code requires raising a ServiceError.
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if status code requires raising a ServiceError
12 13 14 15 16 17 18 19 20
# File 'lib/github_api/response/raise_error.rb', line 12 def on_complete(env) status_code = env[:status].to_i service_error = Github::Error::ServiceError error_class = service_error.error_mapping[status_code] if !error_class and (400...600) === status_code error_class = service_error end raise error_class.new(env) if error_class end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4