Skip to content

Conversation

@gabrielmatau79
Copy link
Collaborator

This PR resolves TypeScript error TS18046 (error is of type 'unknown') by safely handling unknown errors using centralized utility functions. It replaces all unsafe uses of error.message and error.stack with proper guards via instanceof and helper functions.

  • Fixes TS18046 in all try/catch blocks and others
  • Introduced error-utils.ts with getErrorMessage, getErrorDetails
  • Replaced unsafe error.message and error.stack usage with type-safe helpers

…or-utils

Signed-off-by: Gabriel Mata <gabrielmatau@gmail.com>
@gabrielmatau79 gabrielmatau79 self-assigned this Apr 30, 2025
@genaris genaris merged commit cdad11c into main Jun 3, 2025
1 check passed
@genaris genaris deleted the refactor/webrtc-server-error-handling-unknown branch June 3, 2025 18:57
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