MCPcopy Index your code
hub / github.com/parse-community/parse-server / logTriggerErrorBeforeHook

Function logTriggerErrorBeforeHook

src/triggers.js:456–472  ·  view source on GitHub ↗
(triggerType, className, input, auth, error, logLevel)

Source from the content-addressed store, hash-verified

454}
455
456function logTriggerErrorBeforeHook(triggerType, className, input, auth, error, logLevel) {
457 if (logLevel === 'silent') {
458 return;
459 }
460 const cleanInput = logger.truncateLogMessage(JSON.stringify(input));
461 logger[logLevel](
462 `${triggerType} failed for ${className} for user ${userIdForLog(
463 auth
464 )}:\n Input: ${cleanInput}\n Error: ${JSON.stringify(error)}`,
465 {
466 className,
467 triggerType,
468 error,
469 user: userIdForLog(auth),
470 }
471 );
472}
473
474export function maybeRunAfterFindTrigger(
475 triggerType,

Callers 3

maybeRunTriggerFunction · 0.85
maybeRunFileTriggerFunction · 0.85

Calls 2

userIdForLogFunction · 0.85
truncateLogMessageMethod · 0.80

Tested by

no test coverage detected