Exceptions

pyHaFAS can raise multiple exceptions. In the message of the exception you can always find the complete text error message HaFAS returned.

exception pyhafas.types.exceptions.AccessDeniedError[source]

Access is denied

exception pyhafas.types.exceptions.AuthenticationError[source]

Authentiction data missing or wrong

exception pyhafas.types.exceptions.GeneralHafasError[source]

HaFAS returned an general error

exception pyhafas.types.exceptions.JourneysArrivalDepartureTooNearError[source]

Journeys search: arrival and departure date are too near

exception pyhafas.types.exceptions.JourneysTooManyTrainsError[source]

Journeys search: Too many trains, connection is not complete

exception pyhafas.types.exceptions.LocationNotFoundError[source]

Location/stop not found

exception pyhafas.types.exceptions.NoDepartureArrivalDataError[source]

No departure/arrival data available

exception pyhafas.types.exceptions.ProductNotAvailableError[source]

Requested Product is not available in profile

exception pyhafas.types.exceptions.TripDataNotFoundError[source]

No trips found or trip info not available