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

ES.DescribeElasticsearchDomain fails #418

Open
eserte opened this issue Aug 5, 2021 · 1 comment
Open

ES.DescribeElasticsearchDomain fails #418

eserte opened this issue Aug 5, 2021 · 1 comment

Comments

@eserte
Copy link

eserte commented Aug 5, 2021

The following oneliner fails:

$ env AWS_CONFIG_FILE=... perl -MData::Dumper -MPaws -e 'my $x = Paws->service("ES", region => "eu-central-1"); warn Dumper($x->DescribeElasticsearchDomain(DomainName => "..."))'
Not an ARRAY reference at /opt/perl-5.30.3/lib/site_perl/5.30.3/Paws/Net/RestJsonResponse.pm line 145.

The failing line is

145:                    $args{ $att } = $att_class->new(map { ($_->{ $xml_keys } => $_->{ $xml_values }) } @$value);

The debugger shows that $value is a HASH reference, not an ARRAY reference. $key at this point is "LogPublishingOptions".

@Prajithp
Copy link

Prajithp commented Aug 5, 2021

@pplu Do we really need Paws::API::MapParser role for restjson enum class? since the response will be in HashRef instead of ArrayRef.

I managed to fix this by removing the role from the generated class.

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

No branches or pull requests

2 participants