Attempt to fix issue #216-Reduce log noise
This commit is contained in:
parent
d692db6c19
commit
c83f2bc0c2
@ -90,8 +90,13 @@ function getBuildingLikeById(building_id, user_id) {
|
|||||||
).then(res => {
|
).then(res => {
|
||||||
return res && res.like
|
return res && res.like
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.error(error);
|
if (error instanceof pgp.errors.QueryResultError && error.message.includes("No data returned from the query")) {
|
||||||
return undefined;
|
// user hasn't liked building yet
|
||||||
|
return { error: 'It looks like you have not liked this building yet!' };
|
||||||
|
} else {
|
||||||
|
return undefined
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user