britishcycling-oa / opendata

Documentation, Changelog and Issues related to the British Cycling RTPE endpoint
0 stars 2 forks source link

Last page of feed throws error #4

Closed house92 closed 4 years ago

house92 commented 6 years ago

It seems that when your feed runs out of data to provide it throws an error like the example below rather than merely providing an empty array. Could you look into this please?

{
  'errors': [
    {
      'message': 'Internal Server Error',
      'code': 'GEN'
    }
  ]
}
benjamindoe commented 6 years ago

I've noticed that it's not just the last page but various others too depending on the date. Not sure what the pattern is though

https://api.letsride.co.uk/public/v1/rides?from=2018-06-11+01%3A02%3A10 https://api.letsride.co.uk/public/v1/rides?from=2018-02-12+14%3A47%3A28

kent-gosweat commented 6 years ago

Came across the same issue. Presuming it's relating to the lack of data?

Results are still being returned for 1970.

sevenpointsix commented 6 years ago

I believe that this has now been resolved (on our staging server) but this should be checked again post-launch @nickevansuk @house92 .

sevenpointsix commented 6 years ago

Do we have an update on this @nickevansuk @house92 ...? Thanks!

house92 commented 6 years ago

@sevenpointsix It seems to still be an issue: http://api.letsride.co.uk/public/v1/rides?from=1970-01-01+01%3A13%3A19

sevenpointsix commented 6 years ago

@house92 Sorry, I've confused things there; these changes aren't live, just on staging. The staging URL for the API is http://lr-api.staging.phoenixdigital.agency/public/v1/rides . Could you possibly check this issue at that URL? cc. @nickevansuk

nickevansuk commented 6 years ago

Hi @sevenpointsix - if you put that URL in our new validator tool, you'll see all the errors there :)

https://data-model-validator-staging.herokuapp.com/rpde?url=http://lr-api.staging.phoenixdigital.agency/public/v1/rides

Best to keep working on this until the validator passes - hopefully more efficient than manual checking! (Can't tell you how relieved I am to have a validator at last!)

GetTheData commented 5 years ago

I'm still seeing this issue on live, see:

http://api.letsride.co.uk/public/v1/rides?afterTimestamp=1101&afterId=5590

RickCrilly commented 5 years ago

Hi,

Since the fix in #8 I have tested this with the validator and it is not passing. However, there is no longer an internal server error returned.

domfennell commented 5 years ago

Many thanks for sorting issue #8, @RickCrilly. Do you have a timeframe for addressing the errors & warnings thrown-up by the Validator?

nickevansuk commented 5 years ago

Just to give you a breakdown of the source of each of the errors in the validator, if helpful:

These two are quick to fix:

This one may not require any attention:

These can be ignored:

RickCrilly commented 5 years ago

@domfennell Despite the issues appearing to be frustrating simple on the surface (thanks to @nickevansuk for helpfully pointing this out), I'm sorry, I can't give an accurate time frame for the fix. The best I can offer at this point is 'in the coming months'.

Apologies for the inconvenience this is causing anyone.

sevenpointsix commented 5 years ago

@nickevansuk Are you able to confirm the URL at which you see these errors? For example, "kind", "organizer" and so on. I'm not seeing them here (https://data-model-validator-staging.herokuapp.com/rpde?url=https://api.letsride.co.uk/public/v1/rides) but I'm guessing there must be other pages of the feed that aren't valid?

nickevansuk commented 5 years ago

Sure see here: https://validator.openactive.io/?url=http%3A%2F%2Fapi.letsride.co.uk%2Fpublic%2Fv1%2Frides%3FafterTimestamp%3D1101%26afterId%3D5590&version=2.0

nickevansuk commented 4 years ago

Closing as appears to have been resolved