Comments (5)
We can create a new strategy to handle the API errors, not only 404, but 422 or 401 or other HTTP errors.
as this is a JSON API we don't need to return html responses but just json response, something like this:
{
errors:{
resource:[
"Some explanation about the error"
]
},
data:{
}
}
I can think how to handle this.
from disease-info.
Surely it will not be for only 404. I was thinking with @sunday to redirect to the HTML public document provided. But with this comment I agree we should do away with HTML. I will deal with it using rescue_from and simplify it to handle other errors as well.
from disease-info.
@luizvarela @SundayAdefila @osioke I have added root route in this commit.
from disease-info.
@SundayAdefila @luizvarela Solved. This is what I came up with here also Route/diseases to root in this commit. However @luizvarela I beg of you to write test for this PR after merged.
from disease-info.
Fixed with #58
from disease-info.
Related Issues (16)
- Disease name should be case insensitive
- Stop or remove non-diseases from being picked by the scrapper or displayed by the API
- Fix not being able to get only specific information on diseases like Facts or Symptoms of Tuberculosis.
- Update the CONTRIBUTION.md file to mention the issues page and the repo's current project page.
- Conflict Markers On Gemfile
- Update the CONTRIBUTION.md file name to CONTRIBUTING.md and update the contents to mention the issues page and the repo's current project page. HOT 2
- Add another data scrapper to get more information on diseases HOT 2
- Convert some disease sub headings into arrays (sub headings like facts & prevention) to allow the information present here be iterated over HOT 4
- Exception(silent one) in whoscraper HOT 1
- clean up all front-end related work from here
- low code test coverage. HOT 3
- Rails 5 HOT 1
- How many disease is there? HOT 2
- Symptoms task still unchecked in README's todo HOT 3
- Rare flag
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 disease-info.