Skip to content

Commit 6103a9f

Browse files
Merge branch 'master' into update-readme
2 parents 60bcb5c + e29909f commit 6103a9f

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

changes.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
4.1.1
2+
- Fixed bug with deprecated lead resource.
3+
14
4.1.0
25
- Added support for new Articles API.
36
- Added support for new Collections API.

lib/intercom/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def users
104104
Intercom::Service::User.new(self)
105105
end
106106

107+
def leads
108+
Intercom::Service::Lead.new(self)
109+
end
110+
107111
def visitors
108112
Intercom::Service::Visitor.new(self)
109113
end

lib/intercom/request.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,7 @@ def execute(target_base_url = nil, token:, read_timeout: 90, open_timeout: 30, a
158158
private def raise_errors_on_failure(res)
159159
code = res.code.to_i
160160

161-
if code == 404
162-
raise Intercom::ResourceNotFound, 'Resource Not Found'
163-
elsif code == 401
164-
raise Intercom::AuthenticationError, 'Unauthorized'
165-
elsif code == 403
166-
raise Intercom::AuthenticationError, 'Forbidden'
167-
elsif code == 429
161+
if code == 429
168162
raise Intercom::RateLimitExceeded, 'Rate Limit Exceeded'
169163
elsif code == 500
170164
raise Intercom::ServerError, 'Server Error'

lib/intercom/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Intercom #:nodoc:
2-
VERSION = "4.1.0"
2+
VERSION = "4.1.1"
33
end

0 commit comments

Comments
 (0)