Skip to content

Silent failure when edge not found in handleEdgeTransferFromGame, handleTrainLayoutUpdate, handleTeleportPlayerToServer #13

@ILLISIS

Description

@ILLISIS

Bug

Three handlers in instance.ts silently return when an edge cannot be found, with // XXX LATER PROBLEM comments acknowledging the issue. No error is reported to the caller, no retry is attempted, and no rollback occurs.

Affected locations

  • instance.ts:317handleEdgeTransferFromGame: edge transfer data is dropped silently
  • instance.ts:334handleTrainLayoutUpdate: train layout update is dropped silently
  • instance.ts:357handleTeleportPlayerToServer: player teleport silently fails
// handleEdgeTransferFromGame (instance.ts:319-322)
if (!edge) {
    console.log(data);
    console.log("edge not found");
    return; // XXX LATER PROBLEM
}

// handleTrainLayoutUpdate (instance.ts:336-338)
if (!edge) {
    console.log("impossible edge not found!");
    return; // XXX LATER PROBLEM
}

// handleTeleportPlayerToServer (instance.ts:360-362)
if (!edge) {
    console.log("impossible edge not found!");
    return; // XXX LATER PROBLEM
}

Impact

  • Belt/fluid/power/train transfers are silently lost if the edge lookup fails
  • Train layout updates are silently dropped, potentially leaving proxy stations in a stale state
  • Player teleports silently fail with no feedback to the player
  • All failures log only to console.log rather than a proper logger, making them easy to miss in production

Expected behaviour

Each case should either retry the operation, return a failure response to the caller, or at minimum log a proper warning/error through the instance logger so the failure is visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions