Skip to content

Commit 78c7436

Browse files
committed
Run prettier
1 parent ef76290 commit 78c7436

File tree

1 file changed

+8
-3
lines changed
  • src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi/AskAi

1 file changed

+8
-3
lines changed

src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi/AskAi/useAskAi.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ export const useAskAi = (props: Props): UseAskAiResponse => {
8585
processMessage(result.data)
8686
} catch (error) {
8787
// Handle JSON parsing errors or other unexpected errors
88-
if (error instanceof Error && error.message.includes('Event validation failed')) {
88+
if (
89+
error instanceof Error &&
90+
error.message.includes('Event validation failed')
91+
) {
8992
// Already logged above, just re-throw
9093
throw error
9194
}
@@ -95,8 +98,10 @@ export const useAskAi = (props: Props): UseAskAiResponse => {
9598
eventId: sseEvent.id || 'unknown',
9699
eventType: sseEvent.event || 'unknown',
97100
rawEventData: sseEvent.data,
98-
error: error instanceof Error ? error.message : String(error),
99-
errorStack: error instanceof Error ? error.stack : undefined,
101+
error:
102+
error instanceof Error ? error.message : String(error),
103+
errorStack:
104+
error instanceof Error ? error.stack : undefined,
100105
})
101106

102107
throw new Error(

0 commit comments

Comments
 (0)