intercom-ruby
intercom-ruby copied to clipboard
Receive `Intercom::UnexpectedError` when creating a company with race condition
I got Intercom::UnexpectedError
when creating a company with race condition in test workspece.
I want a specific error class like Intercom::MultipleMatchingUsersError
.
Version info
- intercom-ruby version: 4.1.2
- Ruby version: 2.5.8
Expected behavior
like Intercom::MultipleMatchingCompaniesError
Actual behavior
got Intercom::UnexpectedError
Steps to reproduce
- run
intercom.companies.create(attributes)
with 2process - I got
Intercom::UnexpectedError
Logs
Intercom::UnexpectedError
The error of type '' is not recognized. It occurred with the message: Company already exists. and http_code: '400'. Please contact Intercom with these details.
similar https://github.com/intercom/intercom-ruby/issues/448
thanks.