(triggerType, className, input, auth, error, logLevel)
| 454 | } |
| 455 | |
| 456 | function 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 | |
| 474 | export function maybeRunAfterFindTrigger( |
| 475 | triggerType, |
no test coverage detected