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

api: Include stack trace when reporting MalformedServerResponseException #1374

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lakshya1goel
Copy link
Contributor

Fixes: #1083

Changes:

  • Add causeStackTrace field to MalformedServerResponseException
  • Include stack trace in the exception's toString() output
  • Add test to verify stack trace is included in error messages

Testing:

  • Added unit test that verifies stack trace is included when a type mismatch occurs
  • Manually tested with registerQueue to confirm stack trace shows in error dialog

@gnprice
Copy link
Member

gnprice commented Feb 24, 2025

It doesn't look like this new parameter causeStackTrace ever gets passed to the constructor. So it doesn't actually do anything in the live app.

Please test your change end to end in the app, and revise it so it solves the problem described in the issue:

When a request to the server fails, we typically show an error to the user. (The main gap in that is #890, which we should fix.) The details of the error can be useful, particularly if the user takes a screenshot of them to include in reporting the issue to us.

If the cause of the error is that the server's response doesn't match our expectations — a MalformedServerResponseException — then a key thing we want to know is where in the schema the mismatch occurred: what field of what type of object. […] So we should show the stack trace when reporting a MalformedServerResponseException.

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.

Include stack trace when reporting MalformedServerResponseException
2 participants