Skip to content

Commit 2ab8abc

Browse files
Merge branch 'master' into feature/company-delete
2 parents 08ded8b + b38cd9a commit 2ab8abc

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ intercom.tags.all.map {|tag| tag.name }
261261

262262
# Tag companies
263263
tag = intercom.tags.tag(name: 'blue', companies: [{company_id: "42ea2f1b93891f6a99000427"}])
264+
265+
# Untag Companies
266+
tag = intercom.tags.untag(name: 'blue', companies: [{ company_id: "42ea2f1b93891f6a99000427" }])
264267
```
265268

266269
#### Notes

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'

0 commit comments

Comments
 (0)