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

Merged
4 commits merged into from
Dec 5, 2024
Merged

Conversation

ghost
Copy link

@ghost ghost commented Dec 2, 2024

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

@ghost ghost changed the title FT-800: Added better message logging for unhandled exceptions PLT-2791 Added better message logging for unhandled exceptions Dec 3, 2024
@ghost ghost changed the title PLT-2791 Added better message logging for unhandled exceptions FT-800 Added better message logging for unhandled exceptions Dec 3, 2024
@ghost ghost marked this pull request as ready for review December 3, 2024 10:46
@ghost ghost added the READY FOR REVIEW label Dec 3, 2024
@ghost ghost assigned mehtaanshul and cmgrote and unassigned mehtaanshul Dec 3, 2024
@cmgrote cmgrote requested a review from mehtaanshul December 3, 2024 10:50
@ghost ghost assigned ghost and unassigned cmgrote Dec 3, 2024
@ghost ghost requested a review from cmgrote December 3, 2024 10:52
@ghost ghost requested a review from cmgrote December 3, 2024 11:22
@ghost ghost deleted a comment from pavanmanishd Dec 3, 2024
@ghost ghost deleted a comment from pavanmanishd Dec 3, 2024
@ghost ghost requested a review from mehtaanshul December 3, 2024 15:16
@ghost ghost merged commit 59e43a9 into master Dec 5, 2024
10 checks passed
@sumandas0 sumandas0 deleted the FT-800 branch December 5, 2024 18:18
This pull request was closed.
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