Replace throwing error with console.warn() when no train data in response
This commit is contained in:
@ -189,7 +189,7 @@ export default {
|
||||
const getTrainData = httpsCallable(functions, 'getLiveTrainData');
|
||||
getTrainData().then((response) => {
|
||||
try {
|
||||
if (!response.data) throw new Error("Error fetching live train data from the database")
|
||||
if (!response.data) console.warn("No train data in response!");
|
||||
var unorderedTrains = [];
|
||||
var insights = {
|
||||
"totalNumTrains": 0,
|
||||
@ -405,4 +405,4 @@ td.l, th.l{
|
||||
content: "Destination";
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -415,7 +415,7 @@ export default {
|
||||
const getTrainData = httpsCallable(functions, 'getLiveTrainData');
|
||||
getTrainData().then((response) => {
|
||||
try {
|
||||
if (!response.data) throw new Error("Error fetching live train data from the database")
|
||||
if (!response.data) console.warn("No train data in response!");
|
||||
var unorderedTrains = [];
|
||||
var currentMessages = [];
|
||||
var insights = {
|
||||
|
Reference in New Issue
Block a user