mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Log failed server-side data loading
This commit is contained in:
parent
2cfd3deaa1
commit
65e9889656
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
const url = require('url');
|
||||
const { matchPathname, configureStore, routeConfiguration } = require('./importer');
|
||||
const log = require('./log');
|
||||
|
||||
exports.loadData = function(requestUrl, sdk) {
|
||||
const { pathname, query } = url.parse(requestUrl);
|
||||
|
|
@ -23,8 +24,7 @@ exports.loadData = function(requestUrl, sdk) {
|
|||
return store.getState();
|
||||
})
|
||||
.catch(e => {
|
||||
// TODO: log error to Sentry
|
||||
console.error(e);
|
||||
log.error(e, 'server-side-data-load-failed');
|
||||
|
||||
// Call to loadData failed, let client handle the data loading errors.
|
||||
// (It might be recoverable error like lost connection.)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue