-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ servicelib.fastapi
tools and rabbitmq.rpc
errors interface
#5157
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5157 +/- ##
========================================
- Coverage 87.4% 87.1% -0.3%
========================================
Files 1277 1164 -113
Lines 52422 50065 -2357
Branches 1133 928 -205
========================================
- Hits 45836 43630 -2206
+ Misses 6346 6227 -119
+ Partials 240 208 -32
Flags with carried forward coverage won't be shown. Click here to find out more.
|
servicelib.fastapi
and rabbitmq.rpc
toolingservicelib.fastapi
and rabbitmq.rpc
tooling
bd8b969
to
1433bb1
Compare
servicelib.fastapi
and rabbitmq.rpc
toolingservicelib.fastapi
tooling and rabbitmq.rpc
errors interface
servicelib.fastapi
tooling and rabbitmq.rpc
errors interfaceservicelib.fastapi
tools and rabbitmq.rpc
errors interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice! thanks!
packages/models-library/src/models_library/api_schemas_payments/errors.py
Outdated
Show resolved
Hide resolved
4e00de9
to
7b659ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Thanks a lot
Code Climate has analyzed commit 1ef7214 and detected 0 issues on this pull request. View more on Code Climate. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What do these changes do?
♻️
fastapi
toolsSeparation of policies so they can be combined at will (and not imposed from a base class)
app_state.AppStateMixin
: to create/get/delete a single instance of a class in theapp.state
http_client
:httpx.AsyncClient
to bind lifespan of the wrapped client to the apphttpx_utils
: free functions onhttpx
interface✨ RPC errors interface
Allows raising selection of exceptions in rpc (similar to https://tenacity.readthedocs.io/en/latest/#whether-to-retry)
payments
exceptionsmodels_library.api_schemas_payments.errors.
payments.api.rpc
interface: this way interface includes not only functionality but expected errors.payments
plugin will raise in the rpc calls the exceptions above and are handled accordingly in the rest calls. Note that the rest has yet another error handling mechanism that translates these exceptions to http errors. SEEwallets._handlers.handle_wallets_exceptions
)_BaseAppError
: internal topayments
servicePaymentsPluginError
: internal topayments
plugin in webserver_BaseRpcApiError
subclasses: shared by RPC server(inpayments
service) and client (inweb-server
service)🐛 fixes a bug that affect "FAKE" mode
Related issue/s
How to test
see new driving tests files
Dev Checklist
DevOps
repo.config
s. This is a way to clarify whichenv
I am using when I have symbolic links to them