lib/assertiva/localize.rb in assertiva-0.1.1 vs lib/assertiva/localize.rb in assertiva-0.2.0

- old
+ new

@@ -10,13 +10,21 @@ related_by_cpf: "/v1/localize/1005/consultar" } end def self.query_by_cpf(cpf) - Requests.post(self.paths[:by_cpf] + "?cpf=#{cpf}") + begin + Requests.post(self.paths[:by_cpf] + "?cpf=#{cpf}") + rescue => e + raise + end end def self.query_by_name_or_address(query_params) - Requests.post(self.paths[:by_name_or_address], query_params) + begin + + rescue => e + Requests.post(self.paths[:by_name_or_address], query_params) + end end end end \ No newline at end of file