Skip to content

Source with missing county data should return 404 #179

@Kilo59

Description

@Kilo59

Trying to get county data for a source that doesn't contain that level of detail should return a 404

https://coronavirus-tracker-api.herokuapp.com/v2/locations?source=jhu&province=North%20Carolina&county=Wake

{
  "latest": {
    "confirmed": 0,
    "deaths": 0,
    "recovered": 0
  },
  "locations": Array[0][
    
  ]
}

https://coronavirus-tracker-api.herokuapp.com/v2/locations?source=csbs&province=North%20Carolina&county=Wake

{
  "latest": {
    "confirmed": 73,
    "deaths": 0,
    "recovered": 0
  },
  "locations": Array[1][
    {
      "id": 678,
      "country": "US",
      "country_code": "US",
      "county": "Wake",
      "province": "North Carolina",
      "last_updated": "2020-03-25T03:05:00Z",
      "coordinates": {
        "latitude": "35.79010846",
        "longitude": "-78.65039764"
      },
      "latest": {
        "confirmed": 73,
        "deaths": 0,
        "recovered": 0
      }
    }
  ]
}

If no one else addresses it first, I should be able to fix this tonight.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions