another dev question
I was playing with this test case
25_error_on_malformed_response.t
and this test
throws_ok(
sub {
$s->Method3(response => 'notanxmlstring', status => $status)
},
"Paws::Exception",
);
cmp_ok($@->code, 'eq', 'InvalidContent', 'Exception of type InvalidContent');
The question is why are we even testing this?? If the response comming back from AWS is status 200 and XML comming back is malformed then that is not Paws fault??
It should not really thow a 'Paws::Exception' it should just die with the data comming back? I guess what I am saying is that we might not not need to test/catch this sort of error that is comming from AWS.
Hi,
IIRC we are throwing an exception because at some point in time AWS has returned invalid XML on non-200 responses (the test suite tries to covers more cases). The error message was too cryptic when invalid XML came in, so we started to throw a Paws::Exception that at least gives you an indication of what went on.
Ok if that is the case then the test should change to test for case >300
as you say 'invalid XML on non-200 responses'