climate-tech-handbook / climate-tech-handbook/data-magic
API Error Checking
- Dominant language
- Jupyter Notebook
- Stars
- 11
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Right now we don't really have any custom error checking or handling outside of what Flask and Python provide by default. While lower priority than other issues, this seems like something that would be a good intro to the codebase. Potentially a good first issue? If no one picks it up I'll get to it sometime.
An example of some of the error checking would be for instance the [ /edit_file endpoint](https://github.com/climate-tech-handbook/data-magic/blob/8e89f704eb5eb4958e9afafff3c2cea7cb6133d3/app/app.py#LL33C1-L33C43) lets us pass an end line < start line. This doesn't make sense and we should instead abort when it receives that info. Right now it just accepts that and tries to make an edit.
This is ok right now because users of the API know how it should work, but it's some low-hanging fruit that would be an improvement. Open to discussion on this!
Contributor guide
Assessment
This issue has not been assessed yet.