Skip to Content
0
Jan 31, 2022 at 06:54 PM

502 Proxy Error - Transactions Service Layer

338 Views

Se están presentando problemas en service layer con las operaciones que se realizan dentro de transactions tanto en operaciones $batch como las que se realizan por Script Engine. Las operaciones funcionan correctamente cuando se desactivan las validaciones en el SBO_SP_TransactionNotification, pero cuando se lanza un error desde ese procedimiento falla de la siguiente manera:


  • $Batch
--<Batch Boundary>
Content-Type: multipart/mixed;boundary=<Changeset Boundary>

--<Changeset boundary>
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID:1

POST /b1s/v1/PurchaseInvoices
{... json content}
--<Changeset boundary>
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID:2

POST /b1s/v1/VendorPayments

{... json content}
--<Changeset boundary>--
--<Batch Boundary>--

retorna
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head> <title>502 Proxy Error</title></head><body> <h1>Proxy Error</h1> <p>The proxy server received an invalid response from an upstream server.<br />The proxy server could not handle the request <em><a href="/b1s/v1/$batch">POST /b1s/v1/$batch</a></em>.<p> Reason: <strong>Error reading from remote server</strong></p> </p></body></html>
  • Script Engine
image.png
En el anterior script si se ocurre algún un error en el transact notification se ignora completamente y continúa como si nada pasara, aunque las operaciones realizadas no se guardan durante el commit. image.png
Si se eliminan todas las líneas del tipo transaction, entonces el error se muestra correctamente. image.png