Skip to content

Commit

Permalink
Update visionUtils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
BurhanCantCode authored Aug 2, 2024
1 parent 500bac8 commit 3a9cfa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/visionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const scanProduct = async (imageData: string): Promise<{ name: string; qu
} else {
throw new Error('No labels detected in the image');
}
} catch (error) {
} catch (error: unknown) {
console.error('Error in scanProduct:', error);
throw new Error(`Failed to scan product: ${error.message}`);
throw new Error(`Failed to scan product: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
};

0 comments on commit 3a9cfa8

Please sign in to comment.