Skip to content

Conversation

@iaosee
Copy link

@iaosee iaosee commented Aug 4, 2025

If no other information is provided, fallback to the request itself.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

// If we don't have any detailed information, fallback to the request message itself.
return error.message;
// If we don't have any detailed information, fallback to the request itself.
return error;
Copy link

Choose a reason for hiding this comment

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

Bug: Inconsistent Return Types Cause Runtime Errors

The function now returns inconsistent types: while other branches return formatted strings, the fallback case returns the entire error object instead of a string. This type inconsistency could cause runtime errors or unexpected behavior in calling code that expects a string.

Fix in Cursor Fix in Web

@mydea
Copy link
Member

mydea commented Aug 4, 2025

What exactly are you trying to fix here? Is there a problem with the current approach?

@Lms24 Lms24 self-assigned this Aug 4, 2025
@Lms24 Lms24 self-requested a review August 4, 2025 09:23
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Agreed, this change needs more context for us to review. Please write a proper PR description (or link to an issue if there is one)

@iaosee
Copy link
Author

iaosee commented Aug 5, 2025

I thought the request itself should be logged.
But now I see that this is completely unnecessary. I was wrong.

@iaosee iaosee closed this Aug 5, 2025
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.

3 participants