Skip to content

build error handling for collector #11

@sidetrackedmind

Description

@sidetrackedmind

Issue

Last week, when the streetcar provider got an error it blocked the other provider, trimet, from getting data and putting it in s3.

Proposed fix

I propose two improvements:

  1. better error handling / logging in the nextbus provider script
  2. separating the provider calls so that they can fail independently

1. better error handling / logging in the nextbus provider script

See code here for Portland's streetcar provider nextbus - https://github.com/codeforpdx/opentransit-collector/blob/master/src/providers/nextbus.js. We could build in some error handling to try/except flow and log errors. Logging errors would be helpful to aid in bug fixing. Right now, the errors go to the console. If you miss it, it can be hard to recreate.

2. separating the provider calls so that they can fail independently

We could add better error handling to the index.js file https://github.com/codeforpdx/opentransit-collector/blob/master/src/index.js. When the streetcar (nextbus) provider was broken, it was blocking the trimet gtfs-realtime collector from working. Ideally, each provider could fail independently.

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