Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lib/intercom/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ class ServiceConnectionError < IntercomError; end

# Raised when requesting resources on behalf of a user that doesn't exist in your application on Intercom.
class ResourceNotFound < IntercomError; end

# Raised when trying to create a resource that already exists in Intercom.
class ResourceNotUniqueError < IntercomError; end


# Raised when the request has bad syntax
class BadRequestError < IntercomError; end

Expand Down
2 changes: 0 additions & 2 deletions lib/intercom/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ def raise_application_errors_on_failure(error_list_details, http_code)
raise Intercom::ServiceUnavailableError.new(error_details['message'], error_context)
when 'conflict', 'unique_user_constraint'
raise Intercom::MultipleMatchingUsersError.new(error_details['message'], error_context)
when 'resource_conflict'
raise Intercom::ResourceNotUniqueError.new(error_details['message'], error_context)
when nil, ''
raise Intercom::UnexpectedError.new(message_for_unexpected_error_without_type(error_details, parsed_http_code), error_context)
else
Expand Down