amazon-archives / aws-sdk-core-ruby

This repository has moved to the master branch of aws/aws-sdk-ruby
https://github.com/aws/aws-sdk-ruby
243 stars 57 forks source link

Get an InternalFailure on DataPipeline::put_pipeline_definition (when one of the string_value is '' ) #165

Closed zachmoshe closed 9 years ago

zachmoshe commented 9 years ago

When I call put_pipeline_definition on Aws::DataPipeline::Client with parameter_objects which on of them has an attribute with string_value="" I get this error. I understand it's not a legal value (should probably remove the field completely), but still, a nicer error would be appreciated. I guess the InternalFailure is some kind of NPE or method_missing..

I'll try to look at it later and commit a fix, just don't have enough time now..

trevorrowe commented 9 years ago

The SDK does not attempt to validate the contents of strings provided. For many APIs, the empty string is valid input with meaning. Normally, the remote end will return a more helpful error. In this case, the service should not be returning an internal server error, but rather a validation error. I'll go ahead and pass this along to the service team. That said, we would prefer not to hijack or modify the error returned from the remote end.

Thanks for the feedback.