Logs & Error Handling
Lit Action Responses and SDK Logs.
import { LogCategory } from "lit-listener-sdk"
/* returns all logs recorded by the circuit.*/
const allLogs = newCircuit.getLogs()
/* the returned value is array of objects with both category, message and responseObject fields, the category is the enum type and the message is the log description and the responseObject is the returned response object.*/
const { category, message, responseObject } = allLogs[0];
/* returns only the error logs recorded by the circuit.*/
const errorLogsOnly = newCircuit.getLogs(LogCategory.Error)Lit Action Response Object
Last updated