File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,4 +222,4 @@ def export_chats():
222222 type (e ).__name__ ,
223223 exc_info = True ,
224224 )
225- return jsonify ({"error" : f "Export failed: { str ( e ) } " }), 500
225+ return jsonify ({"error" : "Export failed" }), 500
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def footer(self):
176176 type (e ).__name__ ,
177177 exc_info = True ,
178178 )
179- return jsonify ({"error" : f "Failed to generate PDF: { str ( e ) } " }), 500
179+ return jsonify ({"error" : "Failed to generate PDF" }), 500
180180
181181
182182def _render_code_block (pdf , code_text : str ):
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ function normalizeWorkspacesResponse(body) {
9797 }
9898 if ( body && typeof body === 'object' ) {
9999 return {
100- projects : body . projects || [ ] ,
101- warnings : body . warnings || [ ] ,
100+ projects : Array . isArray ( body . projects ) ? body . projects : [ ] ,
101+ warnings : Array . isArray ( body . warnings ) ? body . warnings : [ ] ,
102102 } ;
103103 }
104104 return { projects : [ ] , warnings : [ ] } ;
@@ -117,10 +117,11 @@ function formatParseWarnings(warnings) {
117117 */
118118function showIncompleteResultsBanner ( containerId , warnings ) {
119119 const container = document . getElementById ( containerId ) ;
120- if ( ! container || ! warnings || ! warnings . length ) return ;
120+ if ( ! container ) return ;
121121
122122 const existing = container . querySelector ( '.incomplete-results-banner' ) ;
123123 if ( existing ) existing . remove ( ) ;
124+ if ( ! Array . isArray ( warnings ) || ! warnings . length ) return ;
124125
125126 const text = formatParseWarnings ( warnings ) ;
126127 const banner = document . createElement ( 'div' ) ;
You can’t perform that action at this time.
0 commit comments