Skip to content

Commit

Permalink
better error log
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Wrege committed Jul 21, 2023
1 parent 2af5028 commit bd2c279
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions db/city.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export async function getNewestEnabledInboxCities(
sort: "-updated,city",
});
return resultList.items.map(toRecordToInboxCity);
} catch (error) {
console.error(error);
} catch (error: Error | any) {
console.error("[getNewestEnabledInboxCities]", error.message);
}

return [];
Expand All @@ -90,8 +90,8 @@ export async function getCityById(cityId: string): Promise<InboxCity | null> {
}
);
return toRecordToInboxCity(result);
} catch (error) {
console.error(error);
} catch (error: Error | any) {
console.error("[getCityById]", error.message);
}

return null;
Expand Down Expand Up @@ -129,8 +129,8 @@ export async function search(
});

return resultList.items.map(toRecordToInboxCity);
} catch (error) {
console.error(error);
} catch (error: Error | any) {
console.error("[search]", error.message);
}

return [];
Expand Down Expand Up @@ -197,8 +197,8 @@ export async function autocomplete(
});

return list;
} catch (error) {
console.log(error);
} catch (error: Error | any) {
console.log("[autocomplete]", error.message);
}

return [];
Expand All @@ -217,7 +217,7 @@ async function citAlreadyExists(
);

return true;
} catch (error) {}
} catch (error: Error | any) {}

return false;
}
Expand Down

0 comments on commit bd2c279

Please sign in to comment.