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

FT-800 Added better message logging for unhandled exceptions #3805

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pavanmanish-atlan
Copy link
Collaborator

@pavanmanish-atlan pavanmanish-atlan commented Dec 2, 2024

Change description

  • This update improves exception handling by enhancing the error response to provide more meaningful information for developers.
  • Instead of a generic error message, the response now includes a detailed stack trace analysis, offering insights into the specific cause of the error.

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

Fix FT-800 , PLT-2791

Test Cases

  1. Test Case 1: Single exception

    • Input: IllegalArgumentException("Invalid argument provided")
    • Expected Output: JSON with exception type, message, and location.
  2. Test Case 2: Exception with a cause

    • Input: IllegalStateException("Illegal state occurred") with NullPointerException as cause
    • Expected Output: JSON with both exceptions and their details.
  3. Test Case 3: Exception with no message

    • Input: RuntimeException()
    • Expected Output: JSON with default message "No additional information provided."
  4. Test Case 4: Exception with empty stack trace

    • Input: RuntimeException("Runtime exception occurred") with empty stack trace
    • Expected Output: JSON with "Unavailable" as location.
  5. Test Case 5: Circular cause

    • Input: IllegalArgumentException("Self-causation not permitted") causing itself
    • Expected Output: JSON indicating circular reference detected.
  6. Test Case 6: Null exception

    • Input: null
    • Expected Output: JSON with "No exception provided" message and empty causes list.

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

@pavanmanish-atlan pavanmanish-atlan changed the title FT-800: Added better message logging for unhandled exceptions PLT-2791 Added better message logging for unhandled exceptions Dec 3, 2024
@pavanmanish-atlan pavanmanish-atlan changed the title PLT-2791 Added better message logging for unhandled exceptions FT-800 Added better message logging for unhandled exceptions Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants