Skip to content

Throw more user-friendly exception in EC2 driver on invalid request parameter type#1329

Merged
Kami merged 4 commits intoapache:trunkfrom
Kami:ec2_driver_invalid_usage_fail_loudly
Aug 1, 2019
Merged

Throw more user-friendly exception in EC2 driver on invalid request parameter type#1329
Kami merged 4 commits intoapache:trunkfrom
Kami:ec2_driver_invalid_usage_fail_loudly

Conversation

@Kami
Copy link
Copy Markdown
Member

@Kami Kami commented Jul 31, 2019

EC2 driver uses GET and not POST method for all the outgoing HTTP requests. This means all the action parameters are sent via query parameters and not as a request body.

This means all the parameter values needs to be of a simple type (string), otherwise it won't work as expected.

This pull request updates the code to fail loudly and throw a user-friendly exception in case invalid type is provided for params dictionary item value. Previously a very cryptic error was throw so it was hard to figure out why it's failing.

As a bonus, this change already uncovered a small bug in the Outscale driver - 3dadc47.

Resolves #1321.

Kami added 3 commits July 31, 2019 22:33
"params" argument.

Parameters are sent via query parameters and not as part of a request
body, as such, only strings / simple types are supported.
@Kami Kami merged commit 4d318a8 into apache:trunk Aug 1, 2019
@Kami Kami deleted the ec2_driver_invalid_usage_fail_loudly branch August 1, 2019 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SignatureDoesNotMatch for manual request

1 participant