Skip to content

Commit bc79ce6

Browse files
committed
fix: review comments
1 parent eb45566 commit bc79ce6

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

api/export_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

api/pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

182182
def _render_code_block(pdf, code_text: str):

static/js/app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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
*/
118118
function 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');

0 commit comments

Comments
 (0)