intercom-ruby icon indicating copy to clipboard operation
intercom-ruby copied to clipboard

Receive `Intercom::UnexpectedError` when creating a company with race condition

Open jiikko opened this issue 3 years ago • 0 comments

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

  1. run intercom.companies.create(attributes) with 2process
  2. 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.

jiikko avatar Mar 16 '21 05:03 jiikko