dr-data commited on
Commit
0fc69ba
·
1 Parent(s): c127855

Fix TypeScript error with unknown error type in test-scenarios route

Browse files
Files changed (1) hide show
  1. app/api/test-scenarios/route.ts +2 -1
app/api/test-scenarios/route.ts CHANGED
@@ -54,10 +54,11 @@ export async function POST() {
54
  result: result.detection
55
  });
56
  } catch (error) {
 
57
  results.push({
58
  scenario: scenario.name,
59
  input: scenario.data,
60
- error: error.message
61
  });
62
  }
63
  }
 
54
  result: result.detection
55
  });
56
  } catch (error) {
57
+ const errorMessage = error instanceof Error ? error.message : String(error);
58
  results.push({
59
  scenario: scenario.name,
60
  input: scenario.data,
61
+ error: errorMessage
62
  });
63
  }
64
  }