lib/intercom/request.rb in intercom-0.1.15 vs lib/intercom/request.rb in intercom-0.1.16

- old
+ new

@@ -76,13 +76,15 @@ def raise_errors_on_failure(res) if res.code.to_i.eql?(404) raise Intercom::ResourceNotFound elsif res.code.to_i.eql?(401) raise Intercom::AuthenticationError - elsif res.code.to_i.eql?(503) - raise Intercom::ServiceUnavailableError elsif res.code.to_i.eql?(500) raise Intercom::ServerError + elsif res.code.to_i.eql?(502) + raise Intercom::BadGatewayError + elsif res.code.to_i.eql?(503) + raise Intercom::ServiceUnavailableError end end def self.append_query_string_to_url(url, params) return url if params.empty? \ No newline at end of file