Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Jul 12, 2023
1 parent 5e2787a commit c644fd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rest-exe-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@ const byErrorCode = Object.assign(Object.create(null), {
message: 'trip is cancelled',
props: {
},
}
},
})

// todo: "server returned bogus data" error

export {
// all from ./errors.js
ACCESS_DENIED,
Expand Down
4 changes: 4 additions & 0 deletions parse-rest/trip.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const parseTrip = (ctx, t) => {

const stopovers = sortBy(t.stops || [], 'routeIdx')
.map(st => profile.parseStopover(ctx, st))
if (stopovers.length === 0) {
// todo: throw "server returned bogus data" error
}

const dep = stopovers[0]
const arr = last(stopovers)

Expand Down

0 comments on commit c644fd7

Please sign in to comment.