{"id":257,"date":"2019-11-01T13:57:18","date_gmt":"2019-11-01T13:57:18","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/reliability\/logging-custom-error-handling\/"},"modified":"2020-02-24T11:45:03","modified_gmt":"2020-02-24T11:45:03","slug":"logerror","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/maintainability\/logerror","title":{"rendered":"Custom error handling should be logged"},"content":{"rendered":"\n<p>When custom error handling is enabled a message should be logged so that it can be properly investigated. The rule looks for log message action in the event handler flow (including sub-microflows). <\/p>\n\n\n\n<p>It is best to log the error as soon as possible, preferably in the first few action. This number of actions is configurable.<\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-44.png\" alt=\"\" class=\"wp-image-959\" width=\"162\" height=\"224\"\/><\/figure>\n\n\n\n<p><strong>Compliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"164\" height=\"267\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-45.png\" alt=\"\" class=\"wp-image-960\"\/><\/figure>\n\n\n\n<p>Note:  The message logged does not have to include the actual error message. <\/p>\n","protected":false},"featured_media":0,"parent":98,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-257","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/257"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=257"}],"version-history":[{"count":3,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/257\/revisions"}],"predecessor-version":[{"id":961,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/257\/revisions\/961"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/98"}],"next":[{"title":"Custom error handling should not be \"Continue\"","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/maintainability\/nocontinues","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1282"}],"prev":[{"title":"Actions in a flow should be different","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/maintainability\/actionsshouldbedifferent","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1188"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}