Make error logs clearer about what is missing
This commit is contained in:
@@ -404,8 +404,14 @@ export async function getAnalysisResultsForDoctor(
|
||||
const medusaOrderId =
|
||||
firstAnalysisResponse?.analysis_responses?.analysis_order?.medusa_order_id;
|
||||
|
||||
if (!analysisResponsesData?.length || !userId || !medusaOrderId) {
|
||||
throw new Error('Failed to retrieve full analysis data.');
|
||||
if (!analysisResponsesData?.length) {
|
||||
throw new Error('No analysis responses data found.');
|
||||
}
|
||||
if (!userId) {
|
||||
throw new Error('No user id found.');
|
||||
}
|
||||
if (!medusaOrderId) {
|
||||
throw new Error('No medusa order id found.');
|
||||
}
|
||||
|
||||
const responseElementAnalysisElementOriginalIds = analysisResponsesData.map(
|
||||
|
||||
Reference in New Issue
Block a user