cardano-community / koios-python

Python API Library for Cardano Koios RESTful
MIT License
18 stars 6 forks source link

Adding error handling improvements #7

Closed AstroWa3l closed 1 year ago

AstroWa3l commented 1 year ago

Description

Alex and I have implemented a decorator function in a new script that will handle most of the common error a user may face when querying the KOIOS API endpoints.

Where should the reviewer start?

-> environment.py Then go to all other functions if you want to see how we use the decorator function :)

Motivation and context

We reduced the overall code by adding a pythonic abstraction to handle many errors each function may face during use.

Which issue it fixes?

This was an improvement we already had but no issue was made to tag.

How has this been tested?

Various testing was done in the -> tests.py mainly, but we have also passed the basic unit test we have created in test_koios.py as well.

QuixoteSystems commented 1 year ago

Great improvement!!