Comments (2)
I think it's up to the user to decide what to do in a situation when the error is encountered - by default all the errors are thrown to the upper level so the user can catch and decide if they want to retry based on error code. Some of them indicate that retrying is won't work, for example non existent id that you mention (it will throw JikanRequestException
with StatusCode 404). No the other hand you might met status error 429, meaning there are too many request at once coming from you bot - you might want to wait a little bit and retry the call.
On the other hand wrapper has built-in error supression. You just pass second parameter in a constructor like this:
var jikan = new Jikan(true, true)
Now every failed result will be returned as null
and you just perform a null check. But I would still suggest using try catch: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/try-catch
from jikan.net.
Sorry, still new at debugging and learning and really didn't understand how to use Try/Catch. Figured it out.
from jikan.net.
Related Issues (20)
- [Proposal] Add new constructor to Jikan class HOT 2
- GetSeason returning JikanValidationException for year bigger than current year HOT 3
- Kanjiname returns null HOT 3
- [Proposal] Make argument check on enums to make sure they are valid before making HTTP request HOT 4
- version 1.6.0 change notes? HOT 2
- The server responded with error 400: BadRequest HOT 2
- GetPerson request failed HOT 5
- Exception while trying to get user's manga/anime list HOT 3
- GetCharacterFull seems to be missing HOT 2
- Injectable HttpClient for the HttpClientFactory pattern HOT 3
- the current way to use titles is marked as deprecated HOT 2
- Retrieving next page from GetUpcomingSeasonAsync HOT 2
- GetScheduleAsync exception HOT 12
- GetSeasonAsync doesn't have page param HOT 7
- GetSeason needs params - current season? HOT 2
- JikanApiError is not being deserialized correctly HOT 3
- Response deserialization failing silently
- Review Model not valid (v4) HOT 2
- Review DTO Changes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jikan.net.