{"id":21403,"date":"2019-06-11T05:56:02","date_gmt":"2019-06-11T04:56:02","guid":{"rendered":"https:\/\/developer.kore.ai\/v8-1\/?p=21403"},"modified":"2021-02-05T08:30:57","modified_gmt":"2021-02-05T08:30:57","slug":"customizing-error-messages","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-1\/docs\/bots\/bot-settings\/customizing-error-messages\/","title":{"rendered":"Customizing Error Messages"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>In Bot Builder, each Bot and task contains a set of predefined error messages along with actions for standard HTTP Status codes returned for an HTTP Request method.<\/p>\n<p>In most cases, the default response and action are sufficient for an end-user response, however, you may need to handle other HTTP Status codes not defined by default, or customize the error message itself, or change the default response by Kore.ai in the event of an error.<\/p>\n<p>This topic describes how to customize and create error messages for Kore.ai Bots and tasks.<\/p>\n<p>When you create a Bot or a task, you can add or customize error messages for HTTP Status codes in the <strong>Error Messages<\/strong> section of the Bot or task settings.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/18\/DIYErrorMessages.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8643 alignnone\" src=\"\/wp-content\/uploads\/sites\/18\/DIYErrorMessages.png\" alt=\"Error Message Section\" width=\"895\" height=\"314\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3 id=\"ErrorCode\"><span class=\"ez-toc-section\" id=\"Custom_Status_Codes\">Custom Status Codes<\/span><\/h3>\n<p>There are approximately 25 HTTP Status codes defined by default for a Bot or task.<\/p>\n<p><strong>To customize an HTTP Status code<\/strong><\/p>\n<ol>\n<li>Open the Bot or task in Bot Builder<\/li>\n<li>hover over the side navigation panel of the bot and click <strong>Settings -&gt; Config Settings<\/strong><\/li>\n<li>Scroll down to locate the <strong>Error Messages<\/strong> section.<\/li>\n<li>Click the <strong>Edit<\/strong>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"icon alignnone wp-image-8454\" src=\"\/wp-content\/uploads\/sites\/18\/EditIcon.png\" alt=\"Edit Icon\" width=\"20\" height=\"20\" \/>\u00a0icon for the code that you want to customize to open the\u00a0<strong>Setup Error Message<\/strong> dialog.<\/li>\n<li>In the <strong>Message Type<\/strong> field, select one of:\n<ul>\n<li><strong>Custom<\/strong> &#8211; Displays a\u00a0<strong>Custom Message<\/strong> field to define an error-specific message for the end-user.<\/li>\n<li><strong>Source<\/strong> &#8211; Displays the <strong>Error Paths<\/strong> field where you can define the JSON path from the JSON response payload for HTTP Status codes other than those in the 2XX range (success messages).<\/li>\n<\/ul>\n<\/li>\n<li>In the <strong>Action<\/strong> field, specify the action to take when the number of consecutive errors defined in the <strong>Error Recurrence<\/strong>\u00a0field is reached. Select one of:\n<ul>\n<li><strong>Disable<\/strong> &#8211; The task\u00a0is set to <strong>Inactive<\/strong>\u00a0when the error occurs. The end-user can activate the task\u00a0when needed.<\/li>\n<li><strong>Reschedule<\/strong> &#8211; Displays the <strong>Retry Interval<\/strong> field used to define the elapsed time\u00a0in minutes\u00a0after which to retry the task\u00a0when the error occurs.<\/li>\n<li><strong>Disable Auth<\/strong> &#8211; When the error occurs, the authorization mechanism defined for the task is disabled. Any other task that uses the same authorization mechanism is also disabled.<\/li>\n<li><strong>Notify<\/strong> &#8211; Displays the error message in the end-user interface.<\/li>\n<\/ul>\n<\/li>\n<li>In the <strong>Message<\/strong> field (available only for the default messages), enter the text message displayed to the end-user.<\/li>\n<li>In the <strong>Error Recurrence<\/strong>\u00a0field, specify the number of consecutive error codes must be returned before the action is executed. By default, the\u00a0<strong>Error Recurrence<\/strong>\u00a0field\u00a0is set to &#8221; <span style=\"color: #0000ff\">1<\/span> &#8220;.<\/li>\n<li>Click <strong>Add<\/strong>\u00a0to save and close the <strong>Setup Error Message<\/strong> dialog for your custom error message.<\/li>\n<\/ol>\n<p>To create a new HTTP Status code, click <strong>Add Error Message<\/strong>,\u00a0define the fields for your new code as described in the preceding section, and then click <strong>Add.<\/strong><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"In Bot Builder, each Bot and task contains a set of predefined error messages along with actions for standard HTTP Status codes returned for an HTTP Request method. In most cases, the default response and action are sufficient for an end-user response, however, you may need to handle other HTTP Status codes not defined by...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-21403","post","type-post","status-publish","format-standard","hentry","category-bot-settings"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/21403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/comments?post=21403"}],"version-history":[{"count":4,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/21403\/revisions"}],"predecessor-version":[{"id":22005,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/21403\/revisions\/22005"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/media?parent=21403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/categories?post=21403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/tags?post=21403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}