Recuperation logs Error
# 🤝help
q
Hello, I'd like to make a code or something that retrieves the log that has had an error and store it in a variable how to do it? https://cdn.discordapp.com/attachments/1233677090520432661/1233677091103571999/image.png?ex=662df6d3&is=662ca553&hm=49d61c0283fce739e6cd8e194920a17fa0b08cf11f7a101f667b325906dd48e6&
f
You can do it when it's from code. Then just catch the error and save it to a variable. I think it's going to be a bit harder with other errors from other cards, but they might be saved in the state or event
Message for the future: 1 help post is enough 🙂
q
@fresh-fireman-491 I agree. I've tried but it doesn't recover anything. The variable has to be a string? Is the code OK? https://cdn.discordapp.com/attachments/1233677090520432661/1234174314417356822/image.png?ex=662fc5e6&is=662e7466&hm=5cb97867572be3383b3918c4dc6076f3ca862a94be4fa75d12703f6ccb600c48&
f
turn.KnowledgeAgent.answer
stores the answer from your knowledge agent. You have a workflow that gets executed when theres an unexped error. You can handle them there 🙂 https://cdn.discordapp.com/attachments/1233677090520432661/1234176768525467760/image.png?ex=662fc82f&is=662e76af&hm=fd727ad2db80b1976f34d5a0d26a638b7e51c8efaebed6fa8affe936609d158e&
q
@fresh-fireman-491 Yes, that's what I do. I want to put a code in the error workflow that recovers this log error and stores it in a variable
f
What would you like to do with this variable?
q
@fresh-fireman-491 I just want to send me the contents of this variable automatically, but I know how to do that. I just want to retrieve the contents of the error log with the name of the card where the error occurred.
f
Maybe @famous-jewelry-85388 knows how to save the errors and send them?