Skip to content

Dev -> Main Merge #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 391 commits into
base: main
Choose a base branch
from
Open

Dev -> Main Merge #572

wants to merge 391 commits into from

Conversation

rmusser01
Copy link
Owner

Placeholder for when API backend is setup.
Opening this to track build status of dev.


return schema_info
except Exception as e:
return {"error": str(e)}

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.

Copilot Autofix

AI 8 days ago

To fix the issue, we will replace the direct exposure of the exception message (str(e)) with a generic error message for the user. The detailed exception information, including the stack trace, will be logged on the server for debugging purposes. This ensures that sensitive information is not exposed to external users while still allowing developers to diagnose issues.

The changes will involve:

  1. Logging the exception details (e.g., using Python's logging module).
  2. Returning a generic error message to the user instead of the exception details.
Suggested changeset 1
tldw_Server_API/app/api/v1/endpoints/media.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tldw_Server_API/app/api/v1/endpoints/media.py b/tldw_Server_API/app/api/v1/endpoints/media.py
--- a/tldw_Server_API/app/api/v1/endpoints/media.py
+++ b/tldw_Server_API/app/api/v1/endpoints/media.py
@@ -5406,3 +5406,5 @@
     except Exception as e:
-        return {"error": str(e)}
+        import logging
+        logging.error("An error occurred in the debug_schema endpoint", exc_info=True)
+        return {"error": "An internal error has occurred. Please contact support if the issue persists."}
 
EOF
@@ -5406,3 +5406,5 @@
except Exception as e:
return {"error": str(e)}
import logging
logging.error("An error occurred in the debug_schema endpoint", exc_info=True)
return {"error": "An internal error has occurred. Please contact support if the issue persists."}

Copilot is powered by AI and may make mistakes. Always verify output.
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

rmusser01 and others added 30 commits May 20, 2025 23:43
This commit addresses several failing tests in test_prompts_api.py and test_prompts_db_v2.py.

Key changes include:

- Corrected mocking of settings for token verification tests.
- Ensured token format in auth_headers fixture matches expected format.
- Switched to using UUIDs for prompt updates in certain tests to avoid potential ID lookup issues.
- Added 'deleted' field to prompt search results to fix Pydantic validation.
- Fixed logic in keyword creation to correctly raise ConflictError for active duplicates.
- Refactored sync log endpoint tests to use FastAPI dependency_overrides for reliable mocking.
- Updated database-level prompt creation test to expect ConflictError for duplicates.
…Fully AI

Fix multiple test failures in Prompt Management
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant