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

Add handling for unhandled exceptions #63

Merged
merged 2 commits into from
May 14, 2018

Conversation

tofu-rocketry
Copy link
Member

@tofu-rocketry tofu-rocketry commented May 10, 2018

Partially resolves #62. (Will write up remaining issue separately.)

  1. Add try...except to catch ValueErrors raised when there's no blank line
    beween header and body of an otherwise valid signed message. Raising a
    CryptoException means that the message will be rejected nicely in
    Ssm2.on_message.
  2. Catch IOError in addition to OSError in on_message as there is no real
    difference between them
    and we sometimes get the former being raised.

Part 1 allows the message to be written out to the reject queue. 2 doesn't, but it's an odd situation that will need some more work - see #64.

@tofu-rocketry tofu-rocketry added this to the 2.2.1 milestone May 10, 2018
@tofu-rocketry tofu-rocketry self-assigned this May 10, 2018
@tofu-rocketry tofu-rocketry changed the title 62 unhandled exceptions Add handling for unhandled exceptions May 10, 2018
Catch IOError in addition to OSError in on_message as there is no real
difference between them and we sometimes get the former being raised.
Add try...except to catch ValueErrors raised when there's no blank line
beween header and body of an otherwise valid signed message. Raising a
CryptoException means that the message will be rejected nicely in
Ssm2.on_message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Unhandled exceptions lead to lost messages
2 participants