mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 03:59:33 +02:00
added logs to exception
This commit is contained in:
parent
959ac0a9b2
commit
748a146fe5
1 changed files with 5 additions and 6 deletions
|
@ -11,15 +11,13 @@ module Contact::CompanyRegister
|
||||||
end
|
end
|
||||||
|
|
||||||
def return_company_status
|
def return_company_status
|
||||||
company_register_2 = CompanyRegister::Client.new
|
|
||||||
Rails.logger.info "ident: #{ident}"
|
Rails.logger.info "ident: #{ident}"
|
||||||
Rails.logger.info "org?: #{org?}"
|
Rails.logger.info "org?: #{org?}"
|
||||||
# Rails.logger.info "return_company_data: #{return_company_data.inspect}"
|
Rails.logger.info "return_company_data: #{return_company_data.inspect}"
|
||||||
return_company_data_2 = company_register_2.simple_data(registration_number: ident)
|
|
||||||
Rails.logger.info "return_company_data_2: #{return_company_data_2.inspect}"
|
|
||||||
return if return_company_data_2.blank?
|
|
||||||
|
|
||||||
return_company_data_2.first[:status]
|
return if return_company_data.blank?
|
||||||
|
|
||||||
|
return_company_data.first[:status]
|
||||||
end
|
end
|
||||||
|
|
||||||
def return_company_data
|
def return_company_data
|
||||||
|
@ -27,6 +25,7 @@ module Contact::CompanyRegister
|
||||||
|
|
||||||
company_register.simple_data(registration_number: ident)
|
company_register.simple_data(registration_number: ident)
|
||||||
rescue CompanyRegister::NotAvailableError
|
rescue CompanyRegister::NotAvailableError
|
||||||
|
Rails.logger.info "ERROR HAPPENED: CompanyRegister::NotAvailableError"
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue