Skip to content

Conversation

@codewithdhruba01
Copy link
Contributor

  • Updated error handling to prevent exposing internal error details to the client.
  • Now logs only error messages on the server for debugging purposes.
  • Sends a user-friendly error message ("An unexpected error occurred. Please try again later.") when an error happens.
  • Optimized the getCharacterByName function by replacing the loop with Array.prototype.find() for cleaner and more efficient character lookup.
  • Minor code formatting improvements for better readability.

📋 Checklist:

  • Tested the server locally
  • Verified correct error messages returned
  • Code runs without breaking existing functionality

@softchris
Copy link
Contributor

@codewithdhruba01 thanks for the effort :)

@softchris softchris merged commit fb0f4f8 into microsoft:main May 1, 2025
2 checks passed
@codewithdhruba01 codewithdhruba01 deleted the bugfix/error-handling branch May 2, 2025 04:36
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.

2 participants