Add test for error in business registry

This commit is contained in:
Maciej Szlosarczyk 2018-08-09 15:24:21 +03:00
parent 4cc0669286
commit 256d2b7de4
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
2 changed files with 12 additions and 1 deletions

View file

@ -48,7 +48,7 @@ module Api
@contacts_pool = Contact.where(id: available_contacts_ids)
rescue Soap::Arireg::NotAvailableError => error
Rails.logger.fatal("[EXCEPTION] #{error}")
render json: { errors: [{ base: ["Business Registry Not Available"] }] },
render json: { errors: [{ base: ["Business Registry not available"] }] },
status: :service_unavailable and return
end
end