Skip to content

[WIP] Fix error location issues in Query.searchTrains#139

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-error-location-problems
Closed

[WIP] Fix error location issues in Query.searchTrains#139
Copilot wants to merge 1 commit intomainfrom
copilot/fix-error-location-problems

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

Cloud agent has begun work on im testing the curre... and will update this pull request as work progresses.

Original prompt

im testing the current branch changes an i noticed some erro location problems

version 1.5

tool sbbApi from std.httpCall {
.baseUrl = "https://transport.opendata.ch/v1"
.method = GET
.path = "/connections"
.cache = 60
on error = {"connections": []}
}

bridge Query.searchTrains {
with sbbApi as api
with input as i
with output as o

api.from <- i.from
api.to <- i.to

o <- api.connections[] as c {
.id <- c.from.station.id
.provider = "SBB"
.departureTime <- c.from.departure
.arrivalTime <- c.to.arrival
.transfers <- c.transfers || 0

.legs <- c.sections[] as s {
  .trainName <- s.journey.nmame || s.jomurney.category || "Walk"

  .origin.station.id <- s.departure.station.id
  .origin.station.name <- s.departure.station.name
  .origin.plannedTime <- s.departure.departure
  .origin.actualTime <- s.departure.departure
  .origin.delayMinutes <- s.departure.delay || 0
  .origin.platform <- s.departure.platform

  .destination {
    .station {
      .id <- s.arrival.station.id
      .name <- s.arrival.station.name
    }
    .plannedTime <- s.arrival.arrival
    .actualTime <- s.arrival.arrival
    .delayMinutes <- s.arrival.delay || 0
    .platform <- s.arrival.platform
  }
}

}
}

===

{
"from": "Zürich",
"to": "Genève"
}

===

Bridge Execution Error: Cannot read properties of undefined (reading 'category')
--> playground.bridge:27:21
|
26 | .legs <- c.sections[] as s {
27 | .trainName <- s.journey.nmame || s.jomurney.category || "Walk"
| ^^^^^^^^^^^^^^^
28 |

highliught is on s.journey.nmame but that not correct ... this iwll return null as nmame is missing. the actual broken one is the s.jomurney.category as it will read category from undefined

The user has attached the following file paths as relevant context:

  • AGENTS.md

Created from VS Code.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2026

⚠️ No Changeset found

Latest commit: a3c7fd9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI requested a review from aarne March 17, 2026 16:09
Copilot stopped work on behalf of aarne due to an error March 17, 2026 16:09
@aarne
Copy link
Contributor

aarne commented Mar 17, 2026

dead end also

@aarne aarne closed this Mar 17, 2026
@aarne aarne deleted the copilot/fix-error-location-problems branch March 17, 2026 16:11
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