mapbox / mapbox-sdk-cs

C# libraries for Mapbox API layer
https://mapbox.github.io/mapbox-sdk-cs/
Other
20 stars 11 forks source link

rate error request reporting #55

Open isiyu opened 7 years ago

isiyu commented 7 years ago

Currently tile requests are not returning 429 errors for ratelimits. Pass this on from the requests so unity client can properly handle.

@david-rhodes mentioned you wanted this to be an exception that can be caught?

wilhelmberg commented 7 years ago

I think throwing an exception is kind of harsh for communicating information about a request (rate error, network error, ...).

My thinking was more like UnityWebRequest does it:

david-rhodes commented 7 years ago

@BergWerkGIS Agreed, and forgive me for misrepresenting what I actually intended--which is to encapsulate errors as objects. Ideally, all errors could be represented as objects, not just rate request errors.

In other words, I like your thinking!