Skip to content
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

Improve error messages, add optional debug logging #15

Open
vblagoje opened this issue Jan 13, 2025 · 0 comments
Open

Improve error messages, add optional debug logging #15

vblagoje opened this issue Jan 13, 2025 · 0 comments

Comments

@vblagoje
Copy link
Owner

Description

  1. Error Messages: Certain exceptions are raised with minimal context (e.g., missing operationId, missing parameters). Users could benefit from clearer explanations and tips on how to fix these issues.
  2. Debug Logging: Some users may want to inspect the raw requests/responses for troubleshooting or advanced debugging scenarios.

Why It Matters

  • Better error messages help users resolve problems faster and reduce support requests.
  • Debug logging is crucial for diagnosing issues in production.

Proposed Solution

  • Error Messages:
    • Include more context on the exception (operationId mismatch suggestions, more detail when JSON decoding fails, etc.).
    • Provide instructions or references to relevant sections in the docstrings/README.
  • Debug Logging:
    • Use Python’s logging module with a DEBUG level.
    • Log constructed requests (method, URL, headers, body) and responses (status, headers, JSON) only when debug mode is enabled.

Acceptance Criteria

  • More descriptive exceptions, especially around operationId not found or invalid JSON.
  • Configurable debug logs that reveal request/response details.
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

No branches or pull requests

1 participant