Skip to content

Commit

Permalink
Hotfix dh 4855 (#246)
Browse files Browse the repository at this point in the history
* DH-4826 [ai][admin-console] custom response max length to 3k

* hotfix-DH-4855 fix slackbot message ambiguity

---------

Co-authored-by: Juan Valacco <[email protected]>
  • Loading branch information
DishenWang2023 and Juan Valacco committed May 7, 2024
1 parent 7a1cb7c commit 47b994f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/ai/clients/slack/handlers/message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,17 @@ async function handleMessage(context, say) {
error(
`API Response not ok: status code ${response.status}, ${response.statusText}, error message: ${error_message}, query id: ${query_id}`
)
const responseMessage = `Sorry, something went wrong while generating response for query ${display_id}. We'll get back to you once it's been reviewed by the data-team admins.`
const responseMessage =
query_id == undefined || display_id == undefined
? `:exclamation: Sorry, something went wrong when I was processing your request. Please try again later.`
: `:warning: Sorry, something went wrong while generating response for query ${display_id}. We'll get back to you once it's been reviewed by the data-team admins.`
await say({
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `:warning: ${responseMessage}`,
text: responseMessage,
},
},
],
Expand Down

0 comments on commit 47b994f

Please sign in to comment.