Skip to content

Capture unhandled rejections and global errors #5

@Flussen

Description

@Flussen

Context

Unhandled promise rejections or global exceptions in the Node/FiveM environment can cause silent crashes or leave the server in a corrupted state.

Goal

Subscribe to process-level error events (where supported) and route them through the engine logging system, making them visible and easier to debug.

Tasks

  • Investigate which process-level events are available in the current FiveM runtime (e.g. unhandledRejection, uncaughtException).
  • Add a small bootstrap module that:
    • Subscribes to the supported events.
    • Logs them via LoggerService with stack, context and severity.
  • Ensure that logging such events does not itself throw or create infinite loops.

Acceptance Criteria

  • Unhandled rejections and global exceptions are logged with stack traces.
  • The engine does not silently swallow these errors anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions