mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Add error logging for BookingBreakdown
This commit is contained in:
parent
8a595eda4e
commit
81e945eae3
1 changed files with 5 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ import classNames from 'classnames';
|
|||
import { types } from '../../util/sdkLoader';
|
||||
import { formatMoney } from '../../util/currency';
|
||||
import * as propTypes from '../../util/propTypes';
|
||||
import * as log from '../../util/log';
|
||||
|
||||
import css from './BookingBreakdown.css';
|
||||
|
||||
|
|
@ -77,9 +78,10 @@ export const BookingBreakdownComponent = props => {
|
|||
|
||||
if (isProvider) {
|
||||
if (!isValidCommission(providerCommissionLineItem)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('invalid commission line item:', providerCommissionLineItem);
|
||||
throw new Error('Commission should be present and the value should be zero or negative');
|
||||
log.error(
|
||||
new Error('Commission should be present and the value should be zero or negative'),
|
||||
{ providerCommissionLineItem: providerCommissionLineItem, transaction: transaction }
|
||||
);
|
||||
}
|
||||
|
||||
// The total sum that the customer pays is the payinTotal. We use
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue