Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046510Retail ModulesWeb POSpublic2021-05-05 12:332023-05-24 08:19
alostale 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR23Q3 
No
0046510: unhandled promise rejections are not sent to the terminal log
Unhandled promise rejections are not sent to the terminal log as unhandled errors are.

This causes, for example, not logging unexpected errors in state actions.
1. Edit AddProduct.js
  OB.App.StateAPI.Ticket.addProduct.addActionPreparation(
    async (ticket, payload) => {
      if (true) throw Error('failed adding product');
      // ...

2. Log in pos and try add a product to the ticket
   -> OK: the product is not added because the code above failed
3. Wait until terminal log is sent to backend
4. Log in backoffice and open Terminal Log window
   -> ERROR: there is no entry with the 'failed adding product' message
Implement unhandledrejection event [1] similar to current window.onerror. Note both APIs are different.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event [^]
No tags attached.
Issue History
2021-05-05 12:33alostaleNew Issue
2021-05-05 12:33alostaleAssigned To => Retail
2021-05-05 12:33alostaleTriggers an Emergency Pack => No
2021-05-05 12:50alostaleProposed Solution updated
2022-07-21 15:47radhakrishnanAssigned ToRetail => radhakrishnan
2022-07-21 15:48radhakrishnanStatusnew => scheduled
2023-05-04 07:30marvintmAssigned Toradhakrishnan => Retail
2023-05-09 07:06ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2023-05-10 09:28hgbotNote Added: 0149538
2023-05-24 08:19hgbotResolutionopen => fixed
2023-05-24 08:19hgbotStatusscheduled => closed
2023-05-24 08:19hgbotNote Added: 0150178
2023-05-24 08:19hgbotFixed in Version => RR23Q3
2023-05-24 08:19hgbotNote Added: 0150179

Notes
(0149538)
hgbot   
2023-05-10 09:28   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/517 [^]
(0150178)
hgbot   
2023-05-24 08:19   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/517 [^]
(0150179)
hgbot   
2023-05-24 08:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 82e75b7b6d8385b680c42ecd5eab649560795f54
Author: Radhakrishnan Seeman <radhakrishnan@qualiantech.com>
Date: 24-05-2023 06:11:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/82e75b7b6d8385b680c42ecd5eab649560795f54 [^]

Fixed ISSUE-46510: Added global function to handle unhandled exception

---
M web/org.openbravo.mobile.core/source/main.js
---