Initial commit - WhyRating Engine (Google Reviews Scraper)
This commit is contained in:
@@ -68,8 +68,11 @@ export default function AnalyticsDetailPage() {
|
||||
: `/api/jobs/${jobId}/reviews?limit=10000`;
|
||||
|
||||
fetch(url)
|
||||
.then(res => {
|
||||
if (!res.ok) throw new Error('Failed to fetch reviews');
|
||||
.then(async res => {
|
||||
if (!res.ok) {
|
||||
const errorData = await res.json().catch(() => ({}));
|
||||
throw new Error(errorData.error || `Failed to fetch reviews (${res.status})`);
|
||||
}
|
||||
return res.json();
|
||||
})
|
||||
.then(data => {
|
||||
|
||||
Reference in New Issue
Block a user