eeng / afipws

Ruby client para los servicios web de la AFIP
MIT License
11 stars 19 forks source link

Errores no encapsulados. #38

Open tomasmiguez opened 1 year ago

tomasmiguez commented 1 year ago

Hola, te comento esto por el cambio de interfaz de errores de la 2.x que parece que buscaban encapsular los errores de las dependencias, registramos 2 errores no encapsulados, dejo el stacktrace de cada uno.

gems/savon-2.12.1/lib/savon/response.rb:86:in `raise_soap_and_http_errors!': HTTP error (503): <h1>Service Unavailable</h1> (Savon::HTTPError)
    from gems/savon-2.12.1/lib/savon/response.rb:14:in `initialize'
    from gems/savon-2.12.1/lib/savon/operation.rb:72:in `new'
    from gems/savon-2.12.1/lib/savon/operation.rb:72:in `create_response'
    from gems/savon-2.12.1/lib/savon/operation.rb:58:in `call'
    from gems/savon-2.12.1/lib/savon/client.rb:36:in `call'
    from gems/afipws-2.1.0/lib/afipws/client.rb:8:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:164:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:132:in `ultimo_comprobante_autorizado'
...
gems/savon-2.12.1/lib/savon/operation.rb:27:in `rescue in ensure_exists!': HTTP error (503): <h1>Service Unavailable</h1> (Savon::HTTPError)
    from gems/savon-2.12.1/lib/savon/operation.rb:21:in `ensure_exists!'
    from gems/savon-2.12.1/lib/savon/operation.rb:15:in `create'
    from gems/savon-2.12.1/lib/savon/client.rb:32:in `operation'
    from gems/savon-2.12.1/lib/savon/client.rb:36:in `call'
    from gems/afipws-2.1.0/lib/afipws/client.rb:8:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:164:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:132:in `ultimo_comprobante_autorizado'
...
Caused by: gems/wasabi-3.7.0/lib/wasabi/resolver.rb:47:in `load_from_remote': Error: 503 for url https://servicios1.afip.gov.ar/wsfev1/service.asmx?WSDL (Wasabi::Resolver::HTTPError)
    from gems/wasabi-3.7.0/lib/wasabi/resolver.rb:35:in `resolve'
    from gems/wasabi-3.7.0/lib/wasabi/document.rb:144:in `xml'
    from gems/wasabi-3.7.0/lib/wasabi/document.rb:162:in `parse'
    from gems/wasabi-3.7.0/lib/wasabi/document.rb:149:in `parser'
    from gems/wasabi-3.7.0/lib/wasabi/document.rb:66:in `soap_actions'
    from gems/savon-2.12.1/lib/savon/operation.rb:22:in `ensure_exists!'
    from gems/savon-2.12.1/lib/savon/operation.rb:15:in `create'
    from gems/savon-2.12.1/lib/savon/client.rb:32:in `operation'
    from gems/savon-2.12.1/lib/savon/client.rb:36:in `call'
    from gems/afipws-2.1.0/lib/afipws/client.rb:8:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:164:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:132:in `ultimo_comprobante_autorizado'
...
tomasmiguez commented 1 year ago

Sumo

gems/httpclient-2.8.3/lib/httpclient/session.rb:524:in `rescue in query': HTTPClient::KeepAliveDisconnected: Connection reset by peer (HTTPClient::KeepAliveDisconnected)
    from gems/httpclient-2.8.3/lib/httpclient/session.rb:514:in `query'
    from gems/httpclient-2.8.3/lib/httpclient/session.rb:177:in `query'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1242:in `do_get_block'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1019:in `block in do_request'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1138:in `rescue in protect_keep_alive_disconnected'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1131:in `protect_keep_alive_disconnected'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1014:in `do_request'
    from gems/httpclient-2.8.3/lib/httpclient.rb:856:in `request'
    from gems/httpi-2.5.0/lib/httpi/adapter/httpclient.rb:26:in `request'
    from gems/httpi-2.5.0/lib/httpi.rb:161:in `request'
    from gems/httpi-2.5.0/lib/httpi.rb:133:in `post'
    from gems/savon-2.12.1/lib/savon/operation.rb:94:in `block in call_with_logging'
    from gems/savon-2.12.1/lib/savon/request_logger.rb:12:in `log'
    from gems/savon-2.12.1/lib/savon/operation.rb:94:in `call_with_logging'
    from gems/savon-2.12.1/lib/savon/operation.rb:54:in `call'
    from gems/savon-2.12.1/lib/savon/client.rb:36:in `call'
    from gems/afipws-2.1.0/lib/afipws/client.rb:8:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:164:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:78:in `autorizar_comprobantes'
...
Caused by: /usr/local/lib/ruby/3.2.0/openssl/buffering.rb:354:in `syswrite': Connection reset by peer (Errno::ECONNRESET)
    from /usr/local/lib/ruby/3.2.0/openssl/buffering.rb:354:in `do_write'
    from /usr/local/lib/ruby/3.2.0/openssl/buffering.rb:371:in `block in write'
    from /usr/local/lib/ruby/3.2.0/openssl/buffering.rb:370:in `each'
    from /usr/local/lib/ruby/3.2.0/openssl/buffering.rb:370:in `inject'
    from /usr/local/lib/ruby/3.2.0/openssl/buffering.rb:370:in `write'
    from gems/httpclient-2.8.3/lib/httpclient/ssl_socket.rb:80:in `<<'
    from gems/httpclient-2.8.3/lib/httpclient/http.rb:510:in `dump'
    from gems/httpclient-2.8.3/lib/httpclient/http.rb:962:in `dump'
    from gems/httpclient-2.8.3/lib/httpclient/session.rb:517:in `block in query'
    from /usr/local/lib/ruby/3.2.0/timeout.rb:189:in `block in timeout'
    from /usr/local/lib/ruby/3.2.0/timeout.rb:196:in `timeout'
    from gems/httpclient-2.8.3/lib/httpclient/session.rb:515:in `query'
    from gems/httpclient-2.8.3/lib/httpclient/session.rb:177:in `query'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1242:in `do_get_block'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1019:in `block in do_request'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1138:in `rescue in protect_keep_alive_disconnected'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1131:in `protect_keep_alive_disconnected'
    from gems/httpclient-2.8.3/lib/httpclient.rb:1014:in `do_request'
    from gems/httpclient-2.8.3/lib/httpclient.rb:856:in `request'
    from gems/httpi-2.5.0/lib/httpi/adapter/httpclient.rb:26:in `request'
    from gems/httpi-2.5.0/lib/httpi.rb:161:in `request'
    from gems/httpi-2.5.0/lib/httpi.rb:133:in `post'
    from gems/savon-2.12.1/lib/savon/operation.rb:94:in `block in call_with_logging'
    from gems/savon-2.12.1/lib/savon/request_logger.rb:12:in `log'
    from gems/savon-2.12.1/lib/savon/operation.rb:94:in `call_with_logging'
    from gems/savon-2.12.1/lib/savon/operation.rb:54:in `call'
    from gems/savon-2.12.1/lib/savon/client.rb:36:in `call'
    from gems/afipws-2.1.0/lib/afipws/client.rb:8:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:164:in `request'
    from gems/afipws-2.1.0/lib/afipws/wsfe.rb:78:in `autorizar_comprobantes'
...