New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FeatureRequest: Better exception logging in case of feed processing errors #250
Comments
Besides handling the NPE, it would be very helpful, if lamassu would report, which feed's update failed, e.g. by catching and rethrowing with a wrapping e.g. |
I agree, the current handling is not great https://github.com/entur/lamassu/blob/master/src/main/java/org/entur/lamassu/leader/FeedUpdater.java#L95 Very open to suggestions for improvements here. |
I think we need to pass a Logger instance to the subscription manager here, and add error handling (try/catch) around calling update on each subscription. That way we can extract useful info to log along with the exception. So this is a feature in gbfs-loader-java |
Another example of misleading exceptions is #452. Having |
In case a
station_status
feed (e.g. this one) does not providevehicle_types_available
, a (caught) NPE is reported (see below).I'm a bit in conflict, if lamassu should handle such issues and work around erroneous feeds to have some cleaner error messages/warnings in the logs. On the other hand, starting to fix and work around might be the road to hell, as there will always be issues which should be fixed at the root and not worked around...
Anyway, exception logs would be much more helpful, if they provided the corrupted feed's system_id.
The text was updated successfully, but these errors were encountered: