Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

feat: surface blocklist error message (#2277)

tom896a472f1a94
diff --git a/apps/api/src/scraper/WebScraper/utils/blocklist.ts b/apps/api/src/scraper/WebScraper/utils/blocklist.ts
index 201b447d3..1f7a3966d 100644
--- a/apps/api/src/scraper/WebScraper/utils/blocklist.ts
+++ b/apps/api/src/scraper/WebScraper/utils/blocklist.ts
@@ -28,8 +28,13 @@ export async function initializeBlocklist() {
.from("blocklist")
.select("*")
.single();
- if (error || !data) {
- throw new Error("Error getting blocklist");
+
+ if (error) {
+ throw new Error(`Error getting blocklist: ${error.message}`);
+ }
+
+ if (!data) {
+ throw new Error("Error getting blocklist: No data returned from database");
}
blob = data.data;
}