public-transport / db-hafas

JavaScript client for the Deutsche Bahn HAFAS API.
https://github.com/public-transport/db-hafas
ISC License
75 stars 5 forks source link

200 OK for missing API key #1

Closed derhuerst closed 8 years ago

derhuerst commented 8 years ago
GET http://open-api.bahn.de/bin/rest.exe/location.name?authKey=&format=json

This returns neither a valid JSON error description nor a non-200 HTTP status code. This makes it really hard to programmatically distinguish valid responses from errors.