{"action":"created","issue":{"url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/46","labels_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/46/comments","events_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/46/events","html_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server/issues/46","id":56154531,"number":46,"title":"stations/{id}/relatedonramps gives wrong response","user":{"login":"severity","id":905243,"avatar_url":"https://avatars.githubusercontent.com/u/905243?v=3","gravatar_id":"","url":"https://api.github.com/users/severity","html_url":"https://github.com/severity","followers_url":"https://api.github.com/users/severity/followers","following_url":"https://api.github.com/users/severity/following{/other_user}","gists_url":"https://api.github.com/users/severity/gists{/gist_id}","starred_url":"https://api.github.com/users/severity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/severity/subscriptions","organizations_url":"https://api.github.com/users/severity/orgs","repos_url":"https://api.github.com/users/severity/repos","events_url":"https://api.github.com/users/severity/events{/privacy}","received_events_url":"https://api.github.com/users/severity/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-01T06:39:55Z","updated_at":"2015-02-02T20:46:04Z","closed_at":null,"body":"when going to http://capstoneaa.cs.pdx.edu/api/stations/1 you get the following response:\r\n{\r\n    \"error\": {\r\n        \"code\": 404,\r\n        \"message\": \"Not Found: Could not find the stationID requested\"\r\nblahblahblah.\r\n\r\nhowever, when going to stations/1/relatedonramps, or any other station that does not exist, it shows the following:\r\n{\r\n    \"stationid\": 1,\r\n    \"relatedOnrampId\": null,\r\n    \"relatedOnramps\": [\r\n        {\r\n            \"stationid\": 1091,\r\n            \"localjurisdiction\": 300,\r\n            \"controljurisdiction\": 300,\r\n            \"highwayid\": 11,\r\n            \"enabledflag\": 1,\r\n            \"milepost\": \"71.37\",\r\n            \"milelog\": \"71.37\",\r\n            \"milenumber\": \"71.37\",\r\n            \"locationtext\": \"Skyline Rd EB\",\r\n            \"length\": \"0.63\",\r\n            \"upstream\": 1090,\r\n            \"downstream\": 3161,\r\n            \"stationclass\": 1,\r\n            \"segment_odot\": 0,\r\n            \"numberlanes\": 3,\r\n            \"gisname\": \"-122.7392:45.50745:-122.72497:45.50823\",\r\n            \"smoothingconstant\": \"0.5\",\r\n            \"bridginglimit\": 3,\r\n            \"length_mid\": null,\r\n            \"segment\": null,\r\n            \"downstream_mile\": null,\r\n            \"upstream_mile\": null,\r\n            \"agencyid\": \"141\",\r\n            \"opposite_stationid\": null,\r\n            \"segment_raw\": \"0102000020110F000017000000705blah\r\n            \"segment_50k\": blahblah and so on....\r\n\r\ni believe when looking up a related onramp for a station that does not exist, when the \"relatedOnrampId\" is null, we shouldn't be outputting any station information at all. I'm not sure if we should throw a 404 or just politely reply that the station does not exist and neither does any related onramp."},"comment":{"url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/comments/72534201","html_url":"https://github.com/PSU-Capstone-2014-B/routelandia-server/issues/46#issuecomment-72534201","issue_url":"https://api.github.com/repos/PSU-Capstone-2014-B/routelandia-server/issues/46","id":72534201,"user":{"login":"pgicking","id":1182644,"avatar_url":"https://avatars.githubusercontent.com/u/1182644?v=3","gravatar_id":"","url":"https://api.github.com/users/pgicking","html_url":"https://github.com/pgicking","followers_url":"https://api.github.com/users/pgicking/followers","following_url":"https://api.github.com/users/pgicking/following{/other_user}","gists_url":"https://api.github.com/users/pgicking/gists{/gist_id}","starred_url":"https://api.github.com/users/pgicking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgicking/subscriptions","organizations_url":"https://api.github.com/users/pgicking/orgs","repos_url":"https://api.github.com/users/pgicking/repos","events_url":"https://api.github.com/users/pgicking/events{/privacy}","received_events_url":"https://api.github.com/users/pgicking/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T20:46:04Z","updated_at":"2015-02-02T20:46:04Z","body":"I'd lean towards throwing an exception when the station doesn't exist. Since it always returns the same onramp station when the station doesn't exist, I dont think this is one of those cases where returning nothing is still valid like it was with the highways. "}}