82005: Function execution resulted in an error log
SERVERLESS
ERROR
This error appears when your Twilio Function writes an error-level log during execution. In Functions, calling console.error() creates an error log entry. Twilio also surfaces WARN and ERROR log lines in the Debugger, which helps you trace the code path and message that triggered the event.
- Your Function code called
console.error(). - A conditional branch in your handler logged an application failure with
console.error(). - An exception handler caught an error and wrote the details to
console.error(). - Your Function emitted an error-level log while processing a request, even if the Function still returned a response.
- Review the highlighted log message to identify the exact code path that called
console.error(). - Open your Function's live logs in Console or retrieve logs from the
/Logsresource to inspect the full invocation output. - Use
twilio serverless:logs --tailwhile testing so you can see error logs as your deployed Function runs. - Update your Function to handle expected conditions before they reach an error path.
- Reserve
console.error()for actual failures. Useconsole.warn()orconsole.log()for non-fatal diagnostic output when appropriate. - Redeploy your Function and test again to confirm the invocation no longer emits an error-level log.