{"id":7927,"date":"2024-03-28T07:00:17","date_gmt":"2024-03-28T10:00:17","guid":{"rendered":"https:\/\/blog.botcity.dev\/?p=7927"},"modified":"2024-03-27T12:55:53","modified_gmt":"2024-03-27T15:55:53","slug":"gerenciamento-erros-rpa","status":"publish","type":"post","link":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/","title":{"rendered":"Como gerenciar e monitorar erros de automa\u00e7\u00e3o Python RPA"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Gerenciar e monitorar erros nos projetos de automa\u00e7\u00e3o RPA torna-se cada vez mais importante, conforme a sua opera\u00e7\u00e3o escala. \u00c9 crucial entender os erros das execu\u00e7\u00f5es dos rob\u00f4s para minimiz\u00e1-los ou dar o devido direcionamento, de acordo com o que aconteceu. Vamos entender neste artigo como fazer esse gerenciamento, a import\u00e2ncia de monitorar sua automa\u00e7\u00e3o e como fazer isso.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-weight: 400;\">Gerenciamento de automa\u00e7\u00e3o RPA<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Automa\u00e7\u00f5es RPA podem ter diversas etapas para atender os requisitos de um processo. Precisamos entender como essas etapas devem funcionar e o que \u00e9 importante para as \u00e1reas envolvidas, desde o time que solicitou a demanda, a \u00e1rea usu\u00e1ria, at\u00e9 o time de desenvolvimento. E neste mapeamento, devemos incluir tamb\u00e9m quais s\u00e3o os erros que podem acontecer, pois alguns deles j\u00e1 s\u00e3o at\u00e9 esperados de acontecer.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Precisamos ter clara a ideia de que o <\/span><a href=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/02\/28\/erros-rpa\/\"><span style=\"font-weight: 400;\">RPA vai falhar de qualquer forma<\/span><\/a><span style=\"font-weight: 400;\">. O que n\u00e3o podemos deixar de fazer \u00e9 monitorar para que a rea\u00e7\u00e3o aos erros sejam mais r\u00e1pidas e eficientes e que as pessoas corretas saibam o que aconteceu e onde est\u00e1 o problema, para que possam atuar na corre\u00e7\u00e3o. Ou seja, precisamos ter uma forma eficaz de comunicar o erro.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u26a0\ufe0f <\/span><b>Saiba mais sobre a import\u00e2ncia da orquestra\u00e7\u00e3o em:<\/b> <a href=\"https:\/\/blog.botcity.dev\/pt-br\/2023\/10\/06\/orquestracao-rpa-por-que-e-importante-orquestrar-suas-automacoes-feitas-em-python-ou-outras-linguagens-de-programacao\/\"><span style=\"font-weight: 400;\">Orquestra\u00e7\u00e3o RPA<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-weight: 400;\">Gerenciamento de erros de automa\u00e7\u00e3o RPA<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Se conhecemos bem o processo e existe uma boa documenta\u00e7\u00e3o atualizada sobre como as coisas devem ser feitas e onde as falhas podem acontecer, j\u00e1 podemos prever formas de lidar com esses erros em nosso rob\u00f4.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u26a0\ufe0f <\/span><b>Saiba mais em:<\/b> <a href=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/02\/15\/erros-comuns-rpa\/\"><span style=\"font-weight: 400;\">Erros comuns nos primeiros passos com Python RPA<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">E \u00e9 interessante tamb\u00e9m entender os tipos de erros que podem acontecer com uma automa\u00e7\u00e3o. Um erro pode estar relacionado a forma como o c\u00f3digo foi desenvolvido, ou ao sistema que faz parte do processo que passou por alguma atualiza\u00e7\u00e3o e precisa de outras formas de acesso ou de transfer\u00eancia de dados, entre muitos outros.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-weight: 400;\">Como registrar erros para monitoramento no BotCity Orquestrador<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Para criar o registro do erro no seu rob\u00f4, voc\u00ea precisa se conectar ao BotCity Orquestrador e, para que isso aconte\u00e7a, voc\u00ea dever\u00e1 come\u00e7ar pela <\/span><a href=\"https:\/\/documentation.botcity.dev\/maestro\/features\/errors\/#installation\"><span style=\"font-weight: 400;\">instala\u00e7\u00e3o do SDK<\/span><\/a><span style=\"font-weight: 400;\">. Isso pode variar de acordo com a linguagem de programa\u00e7\u00e3o que estiver utilizando e para mais detalhes consulte a documenta\u00e7\u00e3o. Neste exemplo, vamos utilizar Python.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">No seu terminal, execute o seguinte comando:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<pre>pip install botcity-maestro-sdk<\/pre>\n<p><span style=\"font-weight: 400;\">E lembre-se de adicionar ao arquivo requirements.txt a depend\u00eancia da nova biblioteca instalada, por exemplo:<\/span><\/p>\n<pre>botcity-maestro-sdk&gt;=0.3.3,&lt;1.0<\/pre>\n<p><span style=\"font-weight: 400;\">Ap\u00f3s isso, fa\u00e7a a importa\u00e7\u00e3o da biblioteca no seu c\u00f3digo:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">from botcity.maestro import *<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">E adicione os seguintes comandos:<\/span><\/p>\n<pre># Desabilitando erros caso n\u00e3o exista conex\u00e3o com o Maestro\r\nBotMaestroSDK.RAISE_NOT_CONNECTED = False\r\n\r\n# Instanciando o Maestro SDK\r\nmaestro = BotMaestroSDK.from_sys_args()\r\n# Buscando os detalhes da tarefa atual sendo executada\r\nexecution = maestro.get_execution()<\/pre>\n<p><span style=\"font-weight: 400;\">\u00c9 uma boa pr\u00e1tica que seu c\u00f3digo esteja dentro de uma estrutura de try\/catch ou try\/except, dependendo da linguagem de programa\u00e7\u00e3o. Isso significa que o que estiver dentro do try, tentar\u00e1 ser executado e, caso aconte\u00e7a alguma exce\u00e7\u00e3o, ser\u00e1 direcionado ao bloco de c\u00f3digo do except.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Para voc\u00ea criar um registro de um erro, adicione o seguinte trecho de c\u00f3digo:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0except Exception as ex:<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0maestro.error(<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0task_id=execution.task_id,\u00a0<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0exception=ex<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)\r\n<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Voc\u00ea tamb\u00e9m pode configurar para erros diferentes, por exemplo: ZeroDivisionError, ImportError, entre tantos outros. Ou at\u00e9 mesmo criar exce\u00e7\u00f5es customizadas se necess\u00e1rio. Isso pode ser uma boa pr\u00e1tica para legibilidade do seu c\u00f3digo e das regras de neg\u00f3cio que precisam ser atendidas no projeto.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-weight: 400;\">Como verificar o erro pela tarefa<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Caso voc\u00ea tenha feito a configura\u00e7\u00e3o acima, voc\u00ea pode acompanhar se algum erro aconteceu de algumas formas. A primeira delas seria dentro da pr\u00f3pria tarefa. Na fila de tarefas, clique no ID da tarefa que deseja acompanhar.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7931 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/1.png\" alt=\"Screenshot da tela Task Queue mostrando algumas tarefas que foram executadas e falharam e tem um filtro aplicado no nome da automa\u00e7\u00e3o &quot;BotRegistryProducts&quot;\" width=\"1917\" height=\"859\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/1.png 1917w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/1-300x134.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/1-1024x459.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/1-1536x688.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/1-1200x538.png 1200w\" sizes=\"auto, (max-width: 1917px) 100vw, 1917px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Dentro dela, uma das op\u00e7\u00f5es na parte superior da tela ser\u00e1 \u201cErrors\u201d. Clique nela e ser\u00e1 poss\u00edvel visualizar mais detalhes, caso algum erro tenha ocorrido.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7934 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/2.png\" alt=\"Tela mostrando as informa\u00e7\u00f5es ao clicar na aba &quot;Errors&quot; da tarefa\" width=\"1911\" height=\"856\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/2.png 1911w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/2-300x134.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/2-1024x459.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/2-1536x688.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/2-1200x538.png 1200w\" sizes=\"auto, (max-width: 1911px) 100vw, 1911px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Clique no erro que quer entender mais detalhadamente e voc\u00ea ter\u00e1 novas informa\u00e7\u00f5es sobre ele. Caso queira ainda mais informa\u00e7\u00f5es, voc\u00ea pode clicar no bot\u00e3o identificado como \u201cView\u201d.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7937 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/3.png\" alt=\"Screenshot da tela dos erros de uma tarefa espec\u00edfica com um dos erros expandido mostrando informa\u00e7\u00f5es e o bot\u00e3o View mencionado no texto\" width=\"1914\" height=\"856\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/3.png 1914w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/3-300x134.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/3-1024x458.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/3-1536x687.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/3-1200x537.png 1200w\" sizes=\"auto, (max-width: 1914px) 100vw, 1914px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Essa tela \u00e9 bastante interessante por trazer em detalhes o que aconteceu com o erro, inclusive StackTrace, Tags, Arquivos e Screenshots, caso tenham sido configurados para serem adicionados. Veremos mais para frente como fazer isso.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7941 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/4.png\" alt=\"Screenshot da tela mostrando um exemplo de erro TypeError e uma parte do stacktrace\" width=\"1916\" height=\"860\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/4.png 1916w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/4-300x135.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/4-1024x460.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/4-1536x689.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/4-1200x539.png 1200w\" sizes=\"auto, (max-width: 1916px) 100vw, 1916px\" \/><\/p>\n<h2><span style=\"font-weight: 400;\">Como verificar o erro pela tela \u201cErrors\u201d<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Na categoria \u201cAutomation Control\u201d, clique na op\u00e7\u00e3o \u201cErrors\u201d no menu da lateral esquerda do BotCity Orquestrador. Dessa forma voc\u00ea ter\u00e1 acesso aos erros.Verifique os filtros para facilitar que encontre o que est\u00e1 sendo analisado. Por exemplo: ID da tarefa, reposit\u00f3rio, nome da automa\u00e7\u00e3o e per\u00edodo.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7944 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/5.png\" alt=\"Screenshot da tela Errors\" width=\"1913\" height=\"857\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/5.png 1913w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/5-300x134.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/5-1024x459.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/5-1536x688.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/5-1200x538.png 1200w\" sizes=\"auto, (max-width: 1913px) 100vw, 1913px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Identifique o erro que precisa ser analisado, clique para que seja expandido e clique no bot\u00e3o \u201cView\u201d:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7947 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/6.png\" alt=\"Screenshot da tela errors com o erro de exemplo FileNotFoundError expandido\" width=\"1915\" height=\"863\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/6.png 1915w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/6-300x135.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/6-1024x461.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/6-1536x692.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/6-1200x541.png 1200w\" sizes=\"auto, (max-width: 1915px) 100vw, 1915px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Assim voc\u00ea tamb\u00e9m ter\u00e1 mais detalhes sobre o que aconteceu para que analise de maneira efetiva o que precisa ser feito e onde est\u00e1 o erro especificamente.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7950 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/7.png\" alt=\"Screenshot da tela Error FileNotFoundError mostrando Stacktrace\" width=\"1916\" height=\"862\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/7.png 1916w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/7-300x135.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/7-1024x461.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/7-1536x691.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/7-1200x540.png 1200w\" sizes=\"auto, (max-width: 1916px) 100vw, 1916px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-weight: 400;\">Como receber notifica\u00e7\u00f5es dos erros no e-mail<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Os erros configurados da maneira como mostramos neste artigo e em nossa <\/span><a href=\"https:\/\/documentation.botcity.dev\/maestro\/features\/errors\/\"><span style=\"font-weight: 400;\">documenta\u00e7\u00e3o sobre erros<\/span><\/a><span style=\"font-weight: 400;\"> podem ser notificados por e-mail. Para ativar essa op\u00e7\u00e3o, clique no seu nome no canto superior direito e escolha a op\u00e7\u00e3o \u201cProfile\u201d. Ap\u00f3s isso, clique na op\u00e7\u00e3o \u201cNotifications\u201d do menu da lateral esquerda. Voc\u00ea ter\u00e1 algumas op\u00e7\u00f5es para receber a notifica\u00e7\u00e3o e uma delas estar\u00e1 identificada como \u201cNew error event\u201d.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7952 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/8.png\" alt=\"Screenshot da tela Notifications mostrando a op\u00e7\u00e3o &quot;new error event&quot; ativada\" width=\"1914\" height=\"859\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/8.png 1914w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/8-300x135.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/8-1024x460.png 1024w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/8-1536x689.png 1536w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/8-1200x539.png 1200w\" sizes=\"auto, (max-width: 1914px) 100vw, 1914px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Essa possibilidade facilita bastante o gerenciamento da automa\u00e7\u00e3o e a comunica\u00e7\u00e3o do time para que seja visto de maneira r\u00e1pida o que aconteceu e qual foi a automa\u00e7\u00e3o afetada. E para acessar a tela, basta clicar nas op\u00e7\u00f5es de links disponibilizadas neste mesmo e-mail.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7955 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/9.png\" alt=\"Screenshot do e-mail recebido mostrando as informa\u00e7\u00f5es do erro\" width=\"664\" height=\"576\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/9.png 664w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/9-300x260.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/p>\n<h2><span style=\"font-weight: 400;\">Outras configura\u00e7\u00f5es de erro<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Al\u00e9m das orienta\u00e7\u00f5es passadas, como mencionamos, voc\u00ea tamb\u00e9m pode ter um screenshot da tela quando o erro acontecer e anexar arquivos relacionados ao erro caso seja necess\u00e1rio. Essas informa\u00e7\u00f5es s\u00e3o par\u00e2metros a mais na fun\u00e7\u00e3o. Acompanhe a seguir como adicion\u00e1-los.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"font-weight: 400;\">Como adicionar captura de tela para analisar o erro<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Voc\u00ea precisar\u00e1 acrescentar o par\u00e2metro \u201cscreenshot\u201d na fun\u00e7\u00e3o \u201cerror\u201d. Abaixo temos um exemplo:<\/span><\/p>\n<pre>try:\r\n    div = 0 \/ 0\r\nexcept Exception as error:\r\n    file_path = '\/home\/test\/screenshot.png'\r\n    maestro.error(\r\n        task_id=task.id, \r\n        exception=error, \r\n        screenshot=file_path\r\n    )<\/pre>\n<h3><span style=\"font-weight: 400;\">Como adicionar anexos para analisar o erro<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Voc\u00ea precisar\u00e1 acrescentar o par\u00e2metro \u201cattachments\u201d na fun\u00e7\u00e3o \u201cerror\u201d. Abaixo temos um exemplo:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">try:<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0div = 0 \/ 0<\/span>\r\n<span style=\"font-weight: 400;\">except Exception as error:<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0attachments_files = ['\/home\/test\/error.png', '\/home\/test\/test.txt']<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0maestro.error(\r\n        task_id=task.id, \r\n        exception=error, \r\n        attachments=attachments_files\r\n    )<\/span><\/pre>\n<h2><span style=\"font-weight: 400;\">Como testar a funcionalidade<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Para fazer na pr\u00e1tica tudo o que informamos, voc\u00ea pode <\/span><a href=\"https:\/\/developers.botcity.dev\/getting-started\"><span style=\"font-weight: 400;\">criar a sua conta gratuita<\/span><\/a><span style=\"font-weight: 400;\">, seguir o passo a passo e aproveitar para testar no seu caso de uso esse gerenciamento de erros. E participe da nossa <\/span><a href=\"https:\/\/documentation.botcity.dev\/community\/\"><span style=\"font-weight: 400;\">comunidade<\/span><\/a><span style=\"font-weight: 400;\"> para troca de experi\u00eancias sobre o universo da automa\u00e7\u00e3o RPA.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gerenciar e monitorar erros nos projetos de automa\u00e7\u00e3o RPA torna-se cada vez mais importante, conforme a sua opera\u00e7\u00e3o escala. \u00c9 crucial entender os erros das execu\u00e7\u00f5es dos rob\u00f4s para minimiz\u00e1-los ou dar o devido direcionamento, de acordo com o que aconteceu. Vamos entender neste artigo como fazer esse gerenciamento, a import\u00e2ncia de monitorar sua automa\u00e7\u00e3o<\/p>\n","protected":false},"author":214060721,"featured_media":7959,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[772947],"tags":[],"class_list":["post-7927","post","type-post","status-publish","format-standard","has-post-thumbnail","category-business"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Gerenciamento de erros de automa\u00e7\u00e3o Python RPA<\/title>\n<meta name=\"description\" content=\"Entenda neste artigo como gerenciar erros de automa\u00e7\u00e3o Python RPA de maneira pr\u00e1tica com BotCity Orquestrador.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gerenciamento de erros de automa\u00e7\u00e3o Python RPA\" \/>\n<meta property=\"og:description\" content=\"Entenda neste artigo como gerenciar erros de automa\u00e7\u00e3o Python RPA de maneira pr\u00e1tica com BotCity Orquestrador.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog BotCity - Conte\u00fado para Automa\u00e7\u00e3o e Governan\u00e7a\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-28T10:00:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lorhan Caproni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lorhan Caproni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/\"},\"author\":{\"name\":\"Lorhan Caproni\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/person\\\/c70dcd8d50fca4702dc06ce662e0f111\"},\"headline\":\"Como gerenciar e monitorar erros de automa\u00e7\u00e3o Python RPA\",\"datePublished\":\"2024-03-28T10:00:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/\"},\"wordCount\":1106,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/capas-2-1.png\",\"articleSection\":[\"Python Automation\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/\",\"name\":\"Gerenciamento de erros de automa\u00e7\u00e3o Python RPA\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/capas-2-1.png\",\"datePublished\":\"2024-03-28T10:00:17+00:00\",\"description\":\"Entenda neste artigo como gerenciar erros de automa\u00e7\u00e3o Python RPA de maneira pr\u00e1tica com BotCity Orquestrador.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/capas-2-1.png\",\"contentUrl\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/capas-2-1.png\",\"width\":1400,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/03\\\/28\\\/gerenciamento-erros-rpa\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como gerenciar e monitorar erros de automa\u00e7\u00e3o Python RPA\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#website\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/\",\"name\":\"Blog BotCity\",\"description\":\"Explore o blog BotCity com conte\u00fados para automatizar e governar em Python. Mantenha-se informado e melhore o desempenho tecnol\u00f3gico, a seguran\u00e7a e o ROI da sua empresa.\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#organization\",\"name\":\"BotCity\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"http:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/logo_botcity_2024_black.png\",\"contentUrl\":\"http:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/logo_botcity_2024_black.png\",\"width\":1611,\"height\":384,\"caption\":\"BotCity\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/person\\\/c70dcd8d50fca4702dc06ce662e0f111\",\"name\":\"Lorhan Caproni\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4f02f5e361046d8a6d852df16da98ddff27755dc746d7151c3b577231cbf3ba?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4f02f5e361046d8a6d852df16da98ddff27755dc746d7151c3b577231cbf3ba?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4f02f5e361046d8a6d852df16da98ddff27755dc746d7151c3b577231cbf3ba?s=96&d=identicon&r=g\",\"caption\":\"Lorhan Caproni\"},\"description\":\"BotCity Cofounder and CEO\",\"sameAs\":[\"http:\\\/\\\/botcitydev.wordpress.com\"],\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/author\\\/lorhanb8c3fbc9af\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Gerenciamento de erros de automa\u00e7\u00e3o Python RPA","description":"Entenda neste artigo como gerenciar erros de automa\u00e7\u00e3o Python RPA de maneira pr\u00e1tica com BotCity Orquestrador.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/","og_locale":"pt_BR","og_type":"article","og_title":"Gerenciamento de erros de automa\u00e7\u00e3o Python RPA","og_description":"Entenda neste artigo como gerenciar erros de automa\u00e7\u00e3o Python RPA de maneira pr\u00e1tica com BotCity Orquestrador.","og_url":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/","og_site_name":"Blog BotCity - Conte\u00fado para Automa\u00e7\u00e3o e Governan\u00e7a","article_published_time":"2024-03-28T10:00:17+00:00","og_image":[{"width":1400,"height":800,"url":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png","type":"image\/png"}],"author":"Lorhan Caproni","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Lorhan Caproni","Est. tempo de leitura":"7 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#article","isPartOf":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/"},"author":{"name":"Lorhan Caproni","@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/person\/c70dcd8d50fca4702dc06ce662e0f111"},"headline":"Como gerenciar e monitorar erros de automa\u00e7\u00e3o Python RPA","datePublished":"2024-03-28T10:00:17+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/"},"wordCount":1106,"commentCount":0,"publisher":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#organization"},"image":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png","articleSection":["Python Automation"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/","url":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/","name":"Gerenciamento de erros de automa\u00e7\u00e3o Python RPA","isPartOf":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#primaryimage"},"image":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png","datePublished":"2024-03-28T10:00:17+00:00","description":"Entenda neste artigo como gerenciar erros de automa\u00e7\u00e3o Python RPA de maneira pr\u00e1tica com BotCity Orquestrador.","breadcrumb":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#primaryimage","url":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png","contentUrl":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png","width":1400,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/03\/28\/gerenciamento-erros-rpa\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.botcity.dev\/pt-br\/"},{"@type":"ListItem","position":2,"name":"Como gerenciar e monitorar erros de automa\u00e7\u00e3o Python RPA"}]},{"@type":"WebSite","@id":"https:\/\/blog.botcity.dev\/pt-br\/#website","url":"https:\/\/blog.botcity.dev\/pt-br\/","name":"Blog BotCity","description":"Explore o blog BotCity com conte\u00fados para automatizar e governar em Python. Mantenha-se informado e melhore o desempenho tecnol\u00f3gico, a seguran\u00e7a e o ROI da sua empresa.","publisher":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.botcity.dev\/pt-br\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/blog.botcity.dev\/pt-br\/#organization","name":"BotCity","url":"https:\/\/blog.botcity.dev\/pt-br\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/logo\/image\/","url":"http:\/\/blog.botcity.dev\/wp-content\/uploads\/2025\/09\/logo_botcity_2024_black.png","contentUrl":"http:\/\/blog.botcity.dev\/wp-content\/uploads\/2025\/09\/logo_botcity_2024_black.png","width":1611,"height":384,"caption":"BotCity"},"image":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/person\/c70dcd8d50fca4702dc06ce662e0f111","name":"Lorhan Caproni","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/a4f02f5e361046d8a6d852df16da98ddff27755dc746d7151c3b577231cbf3ba?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a4f02f5e361046d8a6d852df16da98ddff27755dc746d7151c3b577231cbf3ba?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4f02f5e361046d8a6d852df16da98ddff27755dc746d7151c3b577231cbf3ba?s=96&d=identicon&r=g","caption":"Lorhan Caproni"},"description":"BotCity Cofounder and CEO","sameAs":["http:\/\/botcitydev.wordpress.com"],"url":"https:\/\/blog.botcity.dev\/pt-br\/author\/lorhanb8c3fbc9af\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/03\/capas-2-1.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pdx8c3-23R","_links":{"self":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts\/7927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/users\/214060721"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/comments?post=7927"}],"version-history":[{"count":15,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts\/7927\/revisions"}],"predecessor-version":[{"id":8382,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts\/7927\/revisions\/8382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/media\/7959"}],"wp:attachment":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/media?parent=7927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/categories?post=7927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/tags?post=7927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}