mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-27 19:42:11 +10:00
Add more extra data to log requests
This commit is contained in:
parent
b35658accb
commit
e1a820fa18
3 changed files with 16 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ const callLoadData = props => {
|
|||
console.log(`loadData success for ${name} route`);
|
||||
})
|
||||
.catch(e => {
|
||||
log.error(e, 'load-data-failed', { route: route });
|
||||
log.error(e, 'load-data-failed', { routeName: name });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -120,7 +120,11 @@ export const initiateOrder = params =>
|
|||
})
|
||||
.catch(e => {
|
||||
dispatch(initiateOrderError(e));
|
||||
log.error(e, 'initiate-order-failed');
|
||||
log.error(e, 'initiate-order-failed', {
|
||||
listingId: params.listingId.uuid,
|
||||
bookingStart: params.bookingStart,
|
||||
bookingEnd: params.bookingEnd,
|
||||
});
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
|
|
@ -163,7 +167,11 @@ export const speculateTransaction = (listingId, bookingStart, bookingEnd) =>
|
|||
dispatch(speculateTransactionSuccess(tx));
|
||||
})
|
||||
.catch(e => {
|
||||
log.error(e, 'speculate-transaction-failed');
|
||||
log.error(e, 'speculate-transaction-failed', {
|
||||
listingId: listingId.uuid,
|
||||
bookingStart: bookingStart,
|
||||
bookingEnd: bookingEnd,
|
||||
});
|
||||
return dispatch(speculateTransactionError(e));
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -180,6 +180,10 @@ export const signup = params =>
|
|||
.then(() => dispatch(login(email, password)))
|
||||
.catch(e => {
|
||||
dispatch(signupError(e));
|
||||
log.error(e, 'signup-failed');
|
||||
log.error(e, 'signup-failed', {
|
||||
email: params.email,
|
||||
firstName: params.firstName,
|
||||
lastName: params.lastName,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue