MCPcopy
hub / github.com/promptfoo/promptfoo / error

Method error

src/progress/ciProgressReporter.ts:80–95  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

78 }
79
80 error(message: string): void {
81 // Throttle rapid errors to prevent log spam
82 const now = Date.now();
83 if (now - this.lastErrorTime < this.ERROR_THROTTLE_MS) {
84 return;
85 }
86 this.lastErrorTime = now;
87
88 logger.error(`[Evaluation Error] ${message}`);
89
90 if (process.env.GITHUB_ACTIONS) {
91 // Escape special characters for GitHub Actions
92 const escapedMessage = message.replace(/\r?\n/g, ' ').replace(/::/g, ' ');
93 console.log(`::error::${escapedMessage}`);
94 }
95 }
96
97 private logPeriodicUpdate(): void {
98 if (this.completedTests === 0 || this.completedTests === this.totalTests) {

Callers 15

runPromptfooScanFunction · 0.80
postFallbackCommentsFunction · 0.80
database.test.tsFile · 0.80
logger.test.tsFile · 0.80
generate.test.tsFile · 0.80
eval.test.tsFile · 0.80
sendFeedbackFunction · 0.80
gatherFeedbackFunction · 0.80

Calls

no outgoing calls

Tested by 1

get_sagemaker_roleFunction · 0.64