Skip to content
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

Error audit protocols #543

Merged

Conversation

sklump
Copy link
Contributor

@sklump sklump commented Jun 4, 2020

No description provided.

@sklump sklump requested a review from andrewwhitehead June 4, 2020 16:39
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2020

Codecov Report

Merging #543 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
+ Coverage   96.39%   96.42%   +0.02%     
==========================================
  Files         240      240              
  Lines       12575    12657      +82     
==========================================
+ Hits        12122    12204      +82     
  Misses        453      453              

@@ -40,6 +40,7 @@ async def sign(request: web.BaseRequest):
try:
context = request.app["request_context"]
wallet: BaseWallet = await context.inject(BaseWallet)
wallet: BaseWallet = await context.inject(BaseWallet)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch: I will fix it

my_label = request.query.get("my_label") or None
my_endpoint = request.query.get("my_endpoint") or None
request = await connection_mgr.create_request(connection, my_label, my_endpoint)
except (StorageError, WalletError, ConnectionManagerError, BaseModelError) as err:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it just catch BaseError?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK to be specific here: catching an omnibus error will probably make LGTM-bot squawk.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to see what can happen in particular.

@andrewwhitehead andrewwhitehead merged commit e93881f into openwallet-foundation:master Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants