Fossil SCM
If the chat search request has an HTTP error, report it. It currently fails without any useful information, beyond the HTTP code, if the query triggers a prepare() error, but that's at least no longer silently failing.
Commit
5ae93fd23f036bef6991291ccb8d6f049a5652a6f4ffa2f825fb177ac733d8db
Parent
3449350042fa7fb…
1 file changed
+4
| --- src/fossil.page.chat.js | ||
| +++ src/fossil.page.chat.js | ||
| @@ -2401,10 +2401,14 @@ | ||
| 2401 | 2401 | fd.set('q', term); |
| 2402 | 2402 | F.fetch( |
| 2403 | 2403 | "chat-query", { |
| 2404 | 2404 | payload: fd, |
| 2405 | 2405 | responseType: 'json', |
| 2406 | + onerror:function(err){ | |
| 2407 | + Chat.setCurrentView(Chat.e.viewMessages); | |
| 2408 | + Chat.reportErrorAsMessage(err); | |
| 2409 | + }, | |
| 2406 | 2410 | onload:function(jx){ |
| 2407 | 2411 | let previd = 0; |
| 2408 | 2412 | D.clearElement(eMsgTgt); |
| 2409 | 2413 | jx.msgs.forEach((m)=>{ |
| 2410 | 2414 | m.isSearchResult = true; |
| 2411 | 2415 |
| --- src/fossil.page.chat.js | |
| +++ src/fossil.page.chat.js | |
| @@ -2401,10 +2401,14 @@ | |
| 2401 | fd.set('q', term); |
| 2402 | F.fetch( |
| 2403 | "chat-query", { |
| 2404 | payload: fd, |
| 2405 | responseType: 'json', |
| 2406 | onload:function(jx){ |
| 2407 | let previd = 0; |
| 2408 | D.clearElement(eMsgTgt); |
| 2409 | jx.msgs.forEach((m)=>{ |
| 2410 | m.isSearchResult = true; |
| 2411 |
| --- src/fossil.page.chat.js | |
| +++ src/fossil.page.chat.js | |
| @@ -2401,10 +2401,14 @@ | |
| 2401 | fd.set('q', term); |
| 2402 | F.fetch( |
| 2403 | "chat-query", { |
| 2404 | payload: fd, |
| 2405 | responseType: 'json', |
| 2406 | onerror:function(err){ |
| 2407 | Chat.setCurrentView(Chat.e.viewMessages); |
| 2408 | Chat.reportErrorAsMessage(err); |
| 2409 | }, |
| 2410 | onload:function(jx){ |
| 2411 | let previd = 0; |
| 2412 | D.clearElement(eMsgTgt); |
| 2413 | jx.msgs.forEach((m)=>{ |
| 2414 | m.isSearchResult = true; |
| 2415 |