You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When encountering an error in the request, like a 404 when getting a player, the api currently throws an error. As throwing errors is quite expensive, I would prefer for there to be a way to handle these request exceptions myself, like being able to pass an error handler to the client, or perhaps being able to pass a custom apirequester.
The text was updated successfully, but these errors were encountered:
Being able to pass an error handler sounds good, but I don't have experience creating something like that.
If you want to make a PR or work out the idea more, go ahead.
At the moment there are two main ways of handling this that I'm thinking of:
add an argument to the constructor of the ApiRequester as Func<HttpResponseMessage> which will then be called when there isn't a successful response while null is returned.
Allow for a custom ApiRequester to be passed to the RLSClient
Currently I'm leaning more towards the first option, so let me know if you'd really prefer the second
When encountering an error in the request, like a 404 when getting a player, the api currently throws an error. As throwing errors is quite expensive, I would prefer for there to be a way to handle these request exceptions myself, like being able to pass an error handler to the client, or perhaps being able to pass a custom apirequester.
The text was updated successfully, but these errors were encountered: